adammbalogh / key-value-store-memory
Key-value memory store through a simple php array.
0.5.2
2015-11-06 09:01 UTC
Requires
- php: >=5.4.0
- adammbalogh/key-value-store: ~0.5.1
Requires (Dev)
- mockery/mockery: ~0.9.2
- phpunit/phpunit: ~4.2.5
- satooshi/php-coveralls: dev-master
- squizlabs/php_codesniffer: ~1.5
This package is auto-updated.
Last update: 2025-03-01 00:17:57 UTC
README
Description
This library provides a layer to a key value memory store.
It uses a simple php array.
Check out the abstract library to see the other adapters and the Api.
Installation
Install it through composer.
{ "require": { "adammbalogh/key-value-store-memory": "@stable" } }
tip: you should browse the adammbalogh/key-value-store-memory
page to choose a stable version to use, avoid the @stable
meta constraint.
Usage
<?php use AdammBalogh\KeyValueStore\KeyValueStore; use AdammBalogh\KeyValueStore\Adapter\MemoryAdapter as Adapter; $adapter = new Adapter(); $kvs = new KeyValueStore($adapter); $kvs->set('sample_key', 'Sample value'); $kvs->get('sample_key'); $kvs->delete('sample_key');
API
Please visit the API link in the abstract library.
Toolset
Key | Value | Server |
---|---|---|
✔ delete | ✔ get | ✔ flush |
✔ expire | ✔ set | |
✔ getTtl | ||
✔ has | ||
✔ persist |