villain / cache
Cache Component for PHP
Installs: 12
Dependents: 1
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/villain/cache
Requires
- php: >=7.4
- ext-fileinfo: *
- psr/simple-cache: ^1.0.0
Requires (Dev)
- phpunit/phpunit: ^7.5
README
PHP Cache Component
Install
- composer command
composer require villain/cache
Example
MultiFile
$config = [ 'adapter' => 'MultiFileAdapter' ]; $cache = new Cache($config); $cache->set('key', 'value');
File
$config = [ 'dataFile' => __DIR__ . '/catch.txt' ]; $cache = new Cache($config); $cache->set('key', 'value'); var_dump($cache->get('key'));
Array
$config = []; $cache = new Cache($config); $cache->set('key', 'value'); var_dump($cache->get('key'));