vpg / titon.cache
The Titon cache package provides a data caching layer that supports multiple storage engines.
Installs: 7 913
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 9
Forks: 0
Open Issues: 0
Requires
- php: >=5.4.0
- vpg/titon.common: ^1.4
Replaces
- titon/cache: *
This package is not auto-updated.
Last update: 2024-10-26 16:23:12 UTC
README
Provides a data caching layer that supports popular storage engines like Memcache, APC, Redis, Wincache, Xcache,
and the local file system. A Cache
instance can be used to manage and interact with Storage
engines.
$cache = new Titon\Cache\Cache(); $cache->addStorage('memcache', new Titon\Cache\Storage\MemcacheStorage()); $cache->addStorage('fs', new Titon\Cache\Storage\FileSystemStorage()); $cache->set('foo', $data, '+1 hour', 'memcache'); $data = $cache->get('bar', 'fs');
Storage
engines can also be used externally and are primarily injected into other services for caching.
$apc = new Titon\Cache\Storage\ApcStorage(); $apc->remove('foo');
Features
Cache
- Storage management layerStorage
- Vendor specific caching mechanism
Dependencies
Common
Io
(optional, for FileSystemStorage)Db
(optional, for DatabaseStorage)
Requirements
- PHP 5.4.0
- Igbinary (optional)
- Apc (for ApcStorage)
- Memcached (for MemcacheStorage)
- Redis (for RedisStorage)
- Wincache (for WincacheStorage)
- Xcache (for XcacheStorage)