alex-kalanis / memcache-wrapper
PHP wrapper for questioning Memcache as file storage
v2.0.2
2024-03-29 08:41 UTC
Requires
- php: >=7.4.0
- ext-memcached: *
Requires (Dev)
- alex-kalanis/kw_storage: >=5 <6
- friendsofphp/php-cs-fixer: ^3.0
- phpstan/phpstan: ^1.0
- phpstan/phpstan-phpunit: ^1.0
- phpunit/phpunit: >=8 <=9
- shipmonk/composer-dependency-analyser: ^1.4
Suggests
- alex-kalanis/kw_storage: Universal storage libraries
README
Use Memcache records as they were usual files.
Installation
composer.phar require alex-kalanis/memcache-wrapper
(Refer to Composer Documentation if you are not familiar with composer)
Usages
Just only initialize wrapper with your Memcache instance.
Memcache module:
$memcache = new \MemcachePool(); MemcacheWrapper::setPool($memcache); MemcacheWrapper::register();
Then work something like following:
file_get_contents('memcache://any/key/in/memcache/storage'); file_put_contents('memcache://another/key/in/storage', 'add something');
For using storage just look onto kv_storage readme.