windomz / shmcache
轻量级、抽象、可扩展的即用型共享内存操作,利用PHP共享内存函数(shmop)。
v1.0.2
2017-06-29 14:29 UTC
Requires
- php: >=7
Requires (Dev)
- jakub-onderka/php-parallel-lint: ^0.9.2
- phpunit/phpunit: ^6.2
This package is not auto-updated.
Last update: 2024-09-21 00:34:31 UTC
README
轻量级、抽象、可扩展的即用型共享内存操作,利用PHP共享内存函数(shmop)。
功能
安装
在项目目录中打开终端
$ composer require windomz/shmcache
用法
shmcache 的设计理念是保持使用简单和 灵活性。
提供函数的键值对,更多可扩展性和便利性。
<?php use SHMCache\Block; use SHMCache\Cache; // Use by Block, extends \SHMCache\shmop $memory = new Block; $memory->save('key1', 'value1'); $memory->save('key2', 'value2'); echo $memory->get('key1'); echo $memory->get('key2'); // Or use by Cache, same as Block, can not need to new it. Cache::saveCache('key1', 'value1'); Cache::saveCache('key2', 'value2'); echo Cache::getCache('key1'); echo Cache::getCache('key2');
开发
欢迎您的 Star,提交 pull request,报告错误,提出建议并讨论 shmcache。
我非常愿意听到您对 shmcache 的看法,请访问 问题页面。