mag310 / simple-file-cache
Simple file`s cache component
1.0.0
2020-09-21 08:08 UTC
Requires
- php: >=5.3.0
- ext-json: *
- psr/simple-cache: *
Requires (Dev)
- phpunit/phpunit: ^4.8
Suggests
None
Provides
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-08-21 20:46:07 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