通知短信+运营短信,5秒速达,支持群发助手一键发送🚀高效触达和通知客户 广告
##**方法** ###*获得* 控制器:$this->cache 其他:\msqphp\core\cache\Cache::getInstance(); * * * * * ###*cache指针操作* + 所有未指定值取默认配置 ~~~ /** * @param string $type 处理类种类 * @param array $config 处理类配置 * @param handlers\CacheHandlerInterface $handler 处理类对象 * @param string $prefix 前缀 * @param string $key 键 * @param miexd $value 值 * @param int $offset 偏移量 * @param int $expire 过期时间 * @return self */ //初始化指针,并告知处理类种类及配置,没有取默认 $cache->init() : self; //设置处理类的类型 $cache->type(string $type) : self; //设置处理类的配置 $cache->config(array $config) : self; //设置处理类 $cache->handler(handlers\CacheHandlerInterface $handler) : self; //设置当前缓存处理键前缀 $cache->prefix(string $prefix) : self; //设置当前处理缓存键 $cache->key(string $key) : self; //当前处理缓存值 $cache->value($value) : self; //当前处理缓存偏移量 $cache->offset(int $offset) : self; //设置当前处理缓存过期时间 $cache->expire(int $expire) : self; ~~~ * * * * * ###*cache指针对应操作方法* + 错误异常CacheException ~~~ /** * @throws CacheException * @return int 递增递减返回递增递减后的值 */ //是否存在,可用 $cache->exists() : bool $cache->available() : bool //得到对应值 $cache->get() : miexd //赋值 $cache->set() : self //删除 $cache->delete() : self //递增 $cache->inc() : int $cache->increment() : int //递减 $cache->dec() : int $cache->decrement() : int ~~~ * * * * * ###*cache通用方法* ~~~ //清空cache $cache->clear() : void ~~~