From 0ec0b533ffadb4c5da324deae2ac22e53b0f1601 Mon Sep 17 00:00:00 2001 From: devil Date: Sat, 8 Feb 2020 16:54:06 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E9=99=A4=E5=A4=9A=E4=BD=99=E5=85=AC?= =?UTF-8?q?=E5=85=B1=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/common.php | 68 ------------------------------------------ 1 file changed, 68 deletions(-) diff --git a/application/common.php b/application/common.php index c6068ddcd..31d505cd3 100755 --- a/application/common.php +++ b/application/common.php @@ -1556,74 +1556,6 @@ function Authcode($string, $operation = 'DECODE', $key = '', $expiry = 0) { } } -/** - * [SS 设置缓存] - * @author Devil - * @blog http://gong.gg/ - * @version 1.0.0 - * @datetime 2017-09-24T19:01:00+0800 - * @param [string] $key [缓存key] - * @param [mixed] $data [需要存储的数据] - * @return [boolean] [成功true, 失败false] - */ -function SS($key, $data) -{ - if(empty($key) || empty($data)) - { - return false; - } - - $data['cache_time'] = time(); - return cache($key, $data); -} - -/** - * [GS 获取缓存] - * @author Devil - * @blog http://gong.gg/ - * @version 1.0.0 - * @datetime 2017-09-24T18:54:54+0800 - * @param [string] $key [缓存key] - * @param [integer] $expires_time [默认过期时间0长期有效(单位秒)] - * @param [boolean] $is_filem_time [是否返回文件上一次更新时间] - * @return [boolean|mixed] [没数据false, 则数据] - */ -function GS($key, $expires_time = 0, $is_filem_time = false) -{ - if(empty($key)) - { - return false; - } - $data = cache($key); - if($data !== null) - { - $expires_time = intval($expires_time); - if($expires_time > 0) - { - if($data['cache_time']+$expires_time < time()) - { - return false; - } - } - return $data; - } - return false; -} - -/** - * [DS 删除缓存] - * @author Devil - * @blog http://gong.gg/ - * @version 1.0.0 - * @datetime 2017-09-24T19:01:00+0800 - * @param [string] $key [缓存key] - * @return [boolean] [成功true, 失败false] - */ -function DS($key) -{ - return cache($key, null); -} - /** * [ParamsChecked 参数校验方法] * @author Devil