thruster / data-cacher
Thruster DataCacher Component
1.0.0
2015-12-06 15:09 UTC
Requires
- php: >=7.0
Requires (Dev)
- phpunit/phpunit: ~5.0
This package is auto-updated.
Last update: 2024-12-14 03:18:47 UTC
README
[] (https://github.com/ThrusterIO/data-cacher/releases) [] (LICENSE) [] (https://travis-ci.org/ThrusterIO/data-cacher) [] (https://scrutinizer-ci.com/g/ThrusterIO/data-cacher) [] (https://scrutinizer-ci.com/g/ThrusterIO/data-cacher) [] (https://packagist.org/packages/thruster/data-cacher)
The Thruster DataCacher Component.
Install
Via Composer
$ composer require thruster/data-cacher
Usage
$someCacher = new class extends BaseDataCacher { public static function getName() : string { return 'some_cacher'; } public function getKey($keyData) : array { return ['some', $keyData]; } public function getTTL() : int { return 60 * 60 * 24 * 7 } }; $dataCacher = new DataCacher($driver, $someCacher); $dataCacher->cache($object->getId(), $object); $dataCacher->get(101);
Testing
$ composer test
Contributing
Please see CONTRIBUTING and CONDUCT for details.
License
Please see License File for more information.