Download the PHP package acpl/flarum-lscache without Composer

On this page you can find all versions of the php package acpl/flarum-lscache. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package flarum-lscache

โšก LiteSpeed Cache for Flarum

Latest Stable Version Total Downloads GitHub Sponsors

Full-page LiteSpeed caching for Flarum.

If your forum runs on LiteSpeed, this is a must-have for heavy guest and bot traffic. The first request generates a response; LiteSpeed serves later requests for the same cached page directly, without running PHP or querying the database again. This can substantially reduce server load.

Requires LiteSpeed Web Server or OpenLiteSpeed with LSCache enabled.

๐Ÿ“ฅ Installation

Install with Composer:

Back up your .htaccess before enabling the extension. It adds its cache rules to that file on activation.

๐Ÿ”„ Updating

๐Ÿงน Cache Management

Changes invalidate the affected cache entries. For example, a new public post clears the cache for its discussion, tag pages, and the homepage.

Clearing Flarum's cache also clears LSCache, unless you disable this in the extension settings.

To clear only LSCache, use the admin panel's cache menu or the CLI:

โ“ FAQ

Does it cache pages for logged-in users?

No. Forum pages are cached for guests only. Logged-in users can see different content, permissions, notifications, and read states. Sharing their cached pages would be unsafe.

A separate cache for each user would still need to generate each page on that user's first visit, then rebuild it whenever their content changes. That means fewer cache hits and more invalidation work. Guest caching lets many visitors reuse the same response.

Does it work on Apache or nginx?

No. It requires the LSCache engine in LiteSpeed Web Server or OpenLiteSpeed.

๐Ÿง‘๐Ÿปโ€๐Ÿ’ป For Developers

[!NOTE] Cache tags are labels used to invalidate cached responses. They are separate from the discussion tags provided by flarum/tags.

๐Ÿท๏ธ How the Extension Tags Paths

Cache tags come from route names. For example, an extension could register these API routes:

For GET and HEAD responses:

[!TIP] To see the cache tags added for a given request, check the value of the X-LiteSpeed-Tag header in the Network tab of DevTools.

๐Ÿ—‘๏ธ Purging Cache

Successful POST, PUT, PATCH, and DELETE requests to .create, .update, or .delete routes purge the resource's ID tag when an id route parameter is present. A collection's .create route usually has no id, so use events to invalidate its list cache.

For event-based purging, register the singular resource name in $resourcesSupportedByEvent to disable automatic ID purging. Keep this registration inside the condition so your extension also works when LSCache is disabled or absent:

[!TIP] Prefer tags: they also invalidate cached URL variants, including query strings.

For one tag, use addPurgeTag('examples'). To purge URLs directly, use addPurgePath('/api/examples') or addPurgePaths(['/api/examples', '/api/examples/1']).

To handle multiple events in one class, use a subscriber instead:

๐Ÿ”— Links


All versions of flarum-lscache with dependencies

PHP Build Version
Package Version
Requires flarum/core Version ^2.0
php Version ^8.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package acpl/flarum-lscache contains the following files

Loading the files please wait ...