mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 15:12:48 +08:00
增加Test缓存驱动
This commit is contained in:
7
library/think/cache/driver/Apc.php
vendored
7
library/think/cache/driver/Apc.php
vendored
@@ -31,9 +31,7 @@ class Apc
|
|||||||
******************************/
|
******************************/
|
||||||
/**
|
/**
|
||||||
* 架构函数
|
* 架构函数
|
||||||
*
|
|
||||||
* @param array $options 缓存参数
|
* @param array $options 缓存参数
|
||||||
*
|
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
* @access public
|
* @access public
|
||||||
*/
|
*/
|
||||||
@@ -97,11 +95,10 @@ class Apc
|
|||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**删除缓存
|
/**
|
||||||
|
* 删除缓存
|
||||||
* @access public
|
* @access public
|
||||||
*
|
|
||||||
* @param string $name 缓存变量名
|
* @param string $name 缓存变量名
|
||||||
*
|
|
||||||
* @return bool|\string[]
|
* @return bool|\string[]
|
||||||
*/
|
*/
|
||||||
public function rm($name)
|
public function rm($name)
|
||||||
|
|||||||
1
library/think/cache/driver/File.php
vendored
1
library/think/cache/driver/File.php
vendored
@@ -182,7 +182,6 @@ class File
|
|||||||
/**
|
/**
|
||||||
* 清除缓存
|
* 清除缓存
|
||||||
* @access public
|
* @access public
|
||||||
* @param string $name 缓存变量名
|
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public function clear()
|
public function clear()
|
||||||
|
|||||||
2
library/think/cache/driver/Lite.php
vendored
2
library/think/cache/driver/Lite.php
vendored
@@ -80,11 +80,9 @@ class Lite
|
|||||||
/**
|
/**
|
||||||
* 写入缓存
|
* 写入缓存
|
||||||
* @access public
|
* @access public
|
||||||
*
|
|
||||||
* @param string $name 缓存变量名
|
* @param string $name 缓存变量名
|
||||||
* @param mixed $value 存储数据
|
* @param mixed $value 存储数据
|
||||||
* @internal param int $expire 有效时间 0为永久
|
* @internal param int $expire 有效时间 0为永久
|
||||||
*
|
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function set($name, $value, $expire = null)
|
public function set($name, $value, $expire = null)
|
||||||
|
|||||||
2
library/think/cache/driver/Memcache.php
vendored
2
library/think/cache/driver/Memcache.php
vendored
@@ -110,10 +110,8 @@ class Memcache
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除缓存
|
* 删除缓存
|
||||||
*
|
|
||||||
* @param string $name 缓存变量名
|
* @param string $name 缓存变量名
|
||||||
* @param bool|false $ttl
|
* @param bool|false $ttl
|
||||||
*
|
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function rm($name, $ttl = false)
|
public function rm($name, $ttl = false)
|
||||||
|
|||||||
2
library/think/cache/driver/Memcached.php
vendored
2
library/think/cache/driver/Memcached.php
vendored
@@ -111,10 +111,8 @@ class Memcached
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除缓存
|
* 删除缓存
|
||||||
*
|
|
||||||
* @param string $name 缓存变量名
|
* @param string $name 缓存变量名
|
||||||
* @param bool|false $ttl
|
* @param bool|false $ttl
|
||||||
*
|
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function rm($name, $ttl = false)
|
public function rm($name, $ttl = false)
|
||||||
|
|||||||
2
library/think/cache/driver/Sae.php
vendored
2
library/think/cache/driver/Sae.php
vendored
@@ -89,10 +89,8 @@ class Sae
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除缓存
|
* 删除缓存
|
||||||
*
|
|
||||||
* @param string $name 缓存变量名
|
* @param string $name 缓存变量名
|
||||||
* @param bool|false $ttl
|
* @param bool|false $ttl
|
||||||
*
|
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function rm($name, $ttl = false)
|
public function rm($name, $ttl = false)
|
||||||
|
|||||||
67
library/think/cache/driver/Test.php
vendored
Normal file
67
library/think/cache/driver/Test.php
vendored
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
<?php
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | Copyright (c) 2006~2016 http://thinkphp.cn All rights reserved.
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | Author: liu21st <liu21st@gmail.com>
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace think\cache\driver;
|
||||||
|
|
||||||
|
use think\Cache;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 测试缓存类
|
||||||
|
* @author liu21st <liu21st@gmail.com>
|
||||||
|
*/
|
||||||
|
class Test
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 读取缓存
|
||||||
|
* @access public
|
||||||
|
* @param string $name 缓存变量名
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function get($name)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 写入缓存
|
||||||
|
* @access public
|
||||||
|
* @param string $name 缓存变量名
|
||||||
|
* @param mixed $value 存储数据
|
||||||
|
* @param int $expire 有效时间 0为永久
|
||||||
|
* @return boolean
|
||||||
|
*/
|
||||||
|
public function set($name, $value, $expire = null)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除缓存
|
||||||
|
* @access public
|
||||||
|
* @param string $name 缓存变量名
|
||||||
|
* @return boolean
|
||||||
|
*/
|
||||||
|
public function rm($name)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 清除缓存
|
||||||
|
* @access public
|
||||||
|
* @return boolean
|
||||||
|
*/
|
||||||
|
public function clear()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
2
library/think/cache/driver/Wincache.php
vendored
2
library/think/cache/driver/Wincache.php
vendored
@@ -29,9 +29,7 @@ class Wincache
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 架构函数
|
* 架构函数
|
||||||
*
|
|
||||||
* @param array $options 缓存参数
|
* @param array $options 缓存参数
|
||||||
*
|
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
* @access public
|
* @access public
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user