Download the PHP package traackr/cache-engines without Composer
On this page you can find all versions of the php package traackr/cache-engines. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download traackr/cache-engines
More information about traackr/cache-engines
Files in traackr/cache-engines
Package cache-engines
Short Description CakePHP Cache Engines
License
Homepage https://traackr.com/
Informations about the package cache-engines
CakePHP Cache Engines
This CakePHP plugin provides some additional cache engines that can be used by CakePHP.
We currently provide three cache engines:
- RedisTreeCacheEngine: Redis based cache that supports managing keys using wildcards and cache key 'parents'.
- FileTreeCacheEngine: Local filesystem based cache that supports managing keys using wildcards and cache key 'parents'.
- FallBackCacheEngine: Allows you to define two cache engines; the first engine is used as the primary cache engine. The second cache engine is used only if the primary fails.
Installation
Configuring the Engines
To configure and use these cache engines, simply specify the cache engine name in the appropriate configuration file
(this is typically app/Config/bootstrap.php
, c.f., CakePHP cache configuration documentation). The
RedisTreeeEngine
and FileTreeEngine
take the same arguments as the RedisEngine
and FileEngine
that ship with
CakePHP:
Cache::config("post_data", array(
'engine' => 'RedisTree',
'server' => 'redis-server',
'port' => 6379,
'duration' => 300,
'prefix' => 'posts:'
));
FallbackEngine
expects a configuration for the primary and secondary engines:
Cache::config("post_data", array(
'engine' => 'Fallback',
'name' => "post_data",
'primary' => array(
'profile' => '2.8', // optional, if you want to hardcode a predis profile to use
'engine' => 'RedisTree',
'server' => 'redis-server',
'port' => 6379,
'duration' => 300,
'prefix' => 'posts:'
),
'secondary' => array(
// alternate cache if Redis fails
'engine' => 'FileTree',
'path' => CACHE.'/data/',
'duration' => 300
)
));
Documentation
All other documentation can be found in the doc folder.