arabcoders / cache
A Base Cache handler that abstract away all the drivers/adapters differences
Installs: 61
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
pkg:composer/arabcoders/cache
This package is auto-updated.
Last update: 2022-02-01 12:59:21 UTC
README
A Base Cache handler that abstract away all the drivers/adapters differences under common Interface, it can be have many drivers.
Install
Via Composer
$ composer require arabcoders/cache
Usage Example.
<?php require __DIR__ . '/../../autoload.php'; $adapter = new \arabcoders\cache\Adapters\Redis( [ 'port' => 6379, 'server' => '127.0.0.1' ]); $cache = new \arabcoders\cache\Cache( $adapter ); $cache->set( 'test', 'foo', 120 ); echo $cache->get('test')->getValue();