graymatterlabs / simple-cache
PSR-16 implementations
Installs: 1 045
Dependents: 2
Suggesters: 3
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 2
Requires
- php: ^8.0
- psr/simple-cache: ^3.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.9
- phpunit/phpunit: ^9.5
Provides
This package is auto-updated.
Last update: 2024-10-09 12:31:03 UTC
README
Runtime implementations that satisfy the PSR-16 specification. Currently supported are array, "null-object", and cookie-based implementations.
Installation
You can install the package via composer:
composer require graymatterlabs/simple-cache:^1.1
Usage
$cache = new ArrayCache(); // new CookieCache('cookie-name'); $cache->set($key, $value, $ttl); // bool $cache->setMultiple($values, $ttl); // bool $cache->get($key, $default); // $value|$default $cache->getMultiple($keys, $default); // iterator|$default $cache->delete($key); // bool $cache->deleteMultiple($keys); // bool $cache->has($key); // bool $cache->clear();
Testing
composer test
Changelog
Please see the Release Notes for more information on what has changed recently.
Credits
License
The MIT License (MIT). Please see License File for more information.