freedomsex / key-value-storage
This package is abandoned and no longer maintained.
The author suggests using the a4sex/key-value-storage package instead.
A simple key-value storage based on PSR-6, Caching Interface.
v2.0.2
2020-09-27 19:13 UTC
Requires
- php: ^7.2
Requires (Dev)
- phpunit/phpunit: ^7.2
README
A simple key-value storage based on PSR-6, Caching Interface. Inspired by \Memcached()
# Symfony config cache.yaml framework: cache: default_memcached_provider: 'memcached://localhost' pools: memory: adapter: cache.adapter.memcached public: true
use FreedomSex\Services\KeyValueStorage; // ... public function __construct(KeyValueStorage $storage) { $this->storage = $storage; } // ... $storage->save($key, $value, $expires = null); $storage->load($key, $default = null); //// // See source //// // touch, item, clear // [CounterStorage trait] increment, decrement, count