Download the PHP package aalfiann/buffer-cache without Composer
On this page you can find all versions of the php package aalfiann/buffer-cache. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download aalfiann/buffer-cache
More information about aalfiann/buffer-cache
Files in aalfiann/buffer-cache
Package buffer-cache
Short Description Cache the response page with buffer support.
License MIT
Informations about the package buffer-cache
Buffer Cache
Cache the response page with buffer support.
Sometimes we just want to simply cache the output response page.
Dependencies
- Symfony Cache >> symfony/cache
- Doctrine Cache >> doctrine/cache
Installation
Install this package via Composer.
-
With SQLite
Make sure your server already installedphp7-sqlite3
. - With Redis
Usage
Available Constructor
-
Cache with Filesystem
-
Cache with SQLite3
- Cache with Redis
Options in constructor class
Here is the default options in constructor class
For more detail information about predis options. See https://packagist.org/packages/predis/predis.
Url page with extension
This will not cache for url page with binary extension like .exe, .rar, .zip, .mp4, .mp3, etc.
You have to whitelist the extension if you want to cache.
The default extensions which is already allowed are:
Example if you want to add more .py
and .txt
.
Example if you want just allow .js
and .css
only.
-
By options in constructor class
- Or by properties
Http Cache
This library is support http cache but inactivated by default.
If you want to use this, there is three ways :
-
By options in constructor class
-
Or by function
- Or by properties
Note
- I only create buffer cache with using Filesystem, SQLite3 and Redis, so contribution are welcome.