phpcacher
About
A PHP caching library
* v1.0.0, (*1)
Requirements
Supported Drivers
How to Install
- In your composer.json file add this require key:
"require": {
"crazymeeks/phpcacher": "v1.0.0"
}
- Using CLI command, copy and execute this command in the target project or specified folder:
composer require crazymeeks/phpcacher
How to use
setDriver('files');
$data = array('id' => 1, 'name' => 'John Doe');
Store data to cache and expires in 1hr
$data = array('name' => 'John Doe');
$instance->setKey('user')->setItem($data)->expires(3600);
Get Item in the cache
$item = $instance->getItem('user');
Print the item
print_r($item);
?>
Setting Custom Cache Directory
- You can also set your own cache directory where the cache data will be save.
$instance->cache->setDriver('files', '/tmp/'); // For windows users, 'D:/cachetmp' or 'C:/cachetmp'
Report Bug
Email: jeffclaud17@gmail.com, (*2)
Author
Jeff Claud[jeffclaud17@gmail.com], (*3)
Contributors
Aaron Tolentino[aarontolentino123@gmail.com]
Joshua Clifford Reyes, (*4)
Referrences
- See the WIKI for documentation