ThinkCMF5 使用助手函数 cache进行缓存的操作

设置缓存数据

cache('cmf_settings', $value);

获取缓存数据

print_r(cache('cmf_settings'));

删除缓存数据

cache('cmf_settings', NULL);

设置缓存有效期

第三个参数为 int 代表缓存过期时间

cache('cmf_settings', $value,3600);

results matching ""

    No results matching ""