mag310 / simple-file-cache
Simple file`s cache component
1.0.0
2020-09-21 08:08 UTC
This package is auto-updated.
Last update: 2024-11-21 17:08:04 UTC
README
Simple file`s cache component, implementing PSR-16
Installation
- Run this command:
composer require mag310/simple-file-cache
Usages
Simple example
$cache = new FileCache(); $cache->set('custom_key', 'sample data'); $data = $cache->get('custom_key'); $cache->delete('custom_key');
Using categories:
$category = 'category'; $cache = new FileCache(); $cache->set($category . '/key1', 'data1'); $cache->set($category . '/key2', 'data2'); $cache->delete($category);
For Documentations
psr/simple-cache-implementation
Running Tests
We are using PHPUnit
for testing the module. Do the following:
- Run
./vendor/bin/phpunit