theriskus / cache
dev-master
2019-10-02 09:25 UTC
Requires
- php: >=5.3.0
This package is auto-updated.
Last update: 2026-04-05 01:29:46 UTC
README
Requirements
- PHP 5.6 => above
- Composer
- Redis 5.0 (optional)
- Memcached 1.5.X (optional)
Installing
To install this module, you're should use composer library :
composer require theriskus/cache
Simple use:
- For initialize add to your bootstrap file this:
Cache::init(driver);and adduse WorkTestMax\Classes\Cache
Driver must be string and equal: 'redis' or 'memcached' or 'file'
- For set any params:
Cache::set(string $cache_id, mixed $data, int $ttl, string $sub_dir = '') - For get any params:
Cache::get(string $cache_id, string $sub_dir = '');