首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > PHP > PHP抽象类来处理后面的按键上的标签或标志

PHP抽象类来处理后面的按键上的标签或标志

资 源 简 介

Introduction The purpose is to invalidate a collection of keys at once - inspired by the memcached-tag project. I was looking for something simpler, and more compatible so I wrote my own. Features Each key can have multiple flags Each flag and key holds a version number, flag has newer version than key - cache miss Doesn"t delete all keys related to flag, only invalidates Only tries to initiate memcache connection once - cache miss returned at once on later requests Example usage ``` require_once "cache.class.php"; $cache = new cache(array("127.0.0.1")); $key = "test"; $value = rand(3,123); $flags = array("page1","pic1"); $secondsincache = 5; echo "Value to store: $value "; if ($cache->set($key,$value,$secondsincache,$flags)) echo "Cache set successfully!"; echo "Value stored in memcache: ".$cache->

相 关 资 源

您 可 能 感 兴 趣 的

同 类 别 推 荐

VIP VIP