mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-06 23:02:48 +08:00
注释和规范化调整及完善
注释和规范化调整及完善,以及部分代码优化
This commit is contained in:
14
library/think/cache/driver/apc.php
vendored
14
library/think/cache/driver/apc.php
vendored
@@ -28,7 +28,10 @@ class Apc
|
||||
|
||||
/**
|
||||
* 架构函数
|
||||
*
|
||||
* @param array $options 缓存参数
|
||||
*
|
||||
* @throws Exception
|
||||
* @access public
|
||||
*/
|
||||
public function __construct($options = [])
|
||||
@@ -58,7 +61,7 @@ class Apc
|
||||
* @param string $name 缓存变量名
|
||||
* @param mixed $value 存储数据
|
||||
* @param integer $expire 有效时间(秒)
|
||||
* @return boolen
|
||||
* @return bool
|
||||
*/
|
||||
public function set($name, $value, $expire = null)
|
||||
{
|
||||
@@ -89,11 +92,12 @@ class Apc
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除缓存
|
||||
/**删除缓存
|
||||
* @access public
|
||||
*
|
||||
* @param string $name 缓存变量名
|
||||
* @return boolen
|
||||
*
|
||||
* @return bool|\string[]
|
||||
*/
|
||||
public function rm($name)
|
||||
{
|
||||
@@ -103,7 +107,7 @@ class Apc
|
||||
/**
|
||||
* 清除缓存
|
||||
* @access public
|
||||
* @return boolen
|
||||
* @return bool
|
||||
*/
|
||||
public function clear()
|
||||
{
|
||||
|
||||
12
library/think/cache/driver/memcache.php
vendored
12
library/think/cache/driver/memcache.php
vendored
@@ -72,7 +72,7 @@ class Memcache
|
||||
* @param string $name 缓存变量名
|
||||
* @param mixed $value 存储数据
|
||||
* @param integer $expire 有效时间(秒)
|
||||
* @return boolen
|
||||
* @return bool
|
||||
*/
|
||||
public function set($name, $value, $expire = null)
|
||||
{
|
||||
@@ -106,9 +106,11 @@ class Memcache
|
||||
|
||||
/**
|
||||
* 删除缓存
|
||||
* @access public
|
||||
* @param string $name 缓存变量名
|
||||
* @return boolen
|
||||
*
|
||||
* @param string $name 缓存变量名
|
||||
* @param bool|false $ttl
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function rm($name, $ttl = false)
|
||||
{
|
||||
@@ -121,7 +123,7 @@ class Memcache
|
||||
/**
|
||||
* 清除缓存
|
||||
* @access public
|
||||
* @return boolen
|
||||
* @return bool
|
||||
*/
|
||||
public function clear()
|
||||
{
|
||||
|
||||
6
library/think/cache/driver/redis.php
vendored
6
library/think/cache/driver/redis.php
vendored
@@ -67,7 +67,7 @@ class Redis
|
||||
* @param string $name 缓存变量名
|
||||
* @param mixed $value 存储数据
|
||||
* @param integer $expire 有效时间(秒)
|
||||
* @return boolen
|
||||
* @return boolean
|
||||
*/
|
||||
public function set($name, $value, $expire = null)
|
||||
{
|
||||
@@ -107,7 +107,7 @@ class Redis
|
||||
* 删除缓存
|
||||
* @access public
|
||||
* @param string $name 缓存变量名
|
||||
* @return boolen
|
||||
* @return boolean
|
||||
*/
|
||||
public function rm($name)
|
||||
{
|
||||
@@ -117,7 +117,7 @@ class Redis
|
||||
/**
|
||||
* 清除缓存
|
||||
* @access public
|
||||
* @return boolen
|
||||
* @return boolean
|
||||
*/
|
||||
public function clear()
|
||||
{
|
||||
|
||||
2
library/think/cache/driver/secache.php
vendored
2
library/think/cache/driver/secache.php
vendored
@@ -65,7 +65,7 @@ class Secache
|
||||
* @param string $name 缓存变量名
|
||||
* @param mixed $value 存储数据
|
||||
* @param integer $expire 有效时间(秒)
|
||||
* @return boolen
|
||||
* @return boolean
|
||||
*/
|
||||
public function set($name, $value)
|
||||
{
|
||||
|
||||
24
library/think/cache/driver/simple.php
vendored
24
library/think/cache/driver/simple.php
vendored
@@ -26,6 +26,8 @@ class Simple
|
||||
/**
|
||||
* 架构函数
|
||||
* @access public
|
||||
*
|
||||
* @param array $options
|
||||
*/
|
||||
public function __construct($options = [])
|
||||
{
|
||||
@@ -67,13 +69,15 @@ class Simple
|
||||
|
||||
/**
|
||||
* 写入缓存
|
||||
* @access public
|
||||
* @param string $name 缓存变量名
|
||||
* @param mixed $value 存储数据
|
||||
* @param int $expire 有效时间 0为永久
|
||||
* @return boolen
|
||||
* @access public
|
||||
*
|
||||
* @param string $name 缓存变量名
|
||||
* @param mixed $value 存储数据
|
||||
*
|
||||
* @return bool
|
||||
* @internal param int $expire 有效时间 0为永久
|
||||
*/
|
||||
public function set($name, $value, $expire = null)
|
||||
public function set($name, $value)
|
||||
{
|
||||
$filename = $this->filename($name);
|
||||
// 缓存数据
|
||||
@@ -88,7 +92,7 @@ class Simple
|
||||
* 删除缓存
|
||||
* @access public
|
||||
* @param string $name 缓存变量名
|
||||
* @return boolen
|
||||
* @return boolean
|
||||
*/
|
||||
public function rm($name)
|
||||
{
|
||||
@@ -97,9 +101,9 @@ class Simple
|
||||
|
||||
/**
|
||||
* 清除缓存
|
||||
* @access public
|
||||
* @param string $name 缓存变量名
|
||||
* @return boolen
|
||||
* @access public
|
||||
* @return bool
|
||||
* @internal param string $name 缓存变量名
|
||||
*/
|
||||
public function clear()
|
||||
{
|
||||
|
||||
9
library/think/cache/driver/sqlite.php
vendored
9
library/think/cache/driver/sqlite.php
vendored
@@ -31,7 +31,10 @@ class Sqlite
|
||||
|
||||
/**
|
||||
* 架构函数
|
||||
*
|
||||
* @param array $options 缓存参数
|
||||
*
|
||||
* @throws Exception
|
||||
* @access public
|
||||
*/
|
||||
public function __construct($options = [])
|
||||
@@ -74,7 +77,7 @@ class Sqlite
|
||||
* @param string $name 缓存变量名
|
||||
* @param mixed $value 存储数据
|
||||
* @param integer $expire 有效时间(秒)
|
||||
* @return boolen
|
||||
* @return boolean
|
||||
*/
|
||||
public function set($name, $value, $expire = null)
|
||||
{
|
||||
@@ -103,7 +106,7 @@ class Sqlite
|
||||
* 删除缓存
|
||||
* @access public
|
||||
* @param string $name 缓存变量名
|
||||
* @return boolen
|
||||
* @return boolean
|
||||
*/
|
||||
public function rm($name)
|
||||
{
|
||||
@@ -116,7 +119,7 @@ class Sqlite
|
||||
/**
|
||||
* 清除缓存
|
||||
* @access public
|
||||
* @return boolen
|
||||
* @return boolean
|
||||
*/
|
||||
public function clear()
|
||||
{
|
||||
|
||||
9
library/think/cache/driver/wincache.php
vendored
9
library/think/cache/driver/wincache.php
vendored
@@ -28,7 +28,10 @@ class Wincache
|
||||
|
||||
/**
|
||||
* 架构函数
|
||||
*
|
||||
* @param array $options 缓存参数
|
||||
*
|
||||
* @throws Exception
|
||||
* @access public
|
||||
*/
|
||||
public function __construct($options = [])
|
||||
@@ -59,7 +62,7 @@ class Wincache
|
||||
* @param string $name 缓存变量名
|
||||
* @param mixed $value 存储数据
|
||||
* @param integer $expire 有效时间(秒)
|
||||
* @return boolen
|
||||
* @return boolean
|
||||
*/
|
||||
public function set($name, $value, $expire = null)
|
||||
{
|
||||
@@ -95,7 +98,7 @@ class Wincache
|
||||
* 删除缓存
|
||||
* @access public
|
||||
* @param string $name 缓存变量名
|
||||
* @return boolen
|
||||
* @return boolean
|
||||
*/
|
||||
public function rm($name)
|
||||
{
|
||||
@@ -105,7 +108,7 @@ class Wincache
|
||||
/**
|
||||
* 清除缓存
|
||||
* @access public
|
||||
* @return boolen
|
||||
* @return boolean
|
||||
*/
|
||||
public function clear()
|
||||
{
|
||||
|
||||
6
library/think/cache/driver/xcache.php
vendored
6
library/think/cache/driver/xcache.php
vendored
@@ -62,7 +62,7 @@ class Xcache
|
||||
* @param string $name 缓存变量名
|
||||
* @param mixed $value 存储数据
|
||||
* @param integer $expire 有效时间(秒)
|
||||
* @return boolen
|
||||
* @return boolean
|
||||
*/
|
||||
public function set($name, $value, $expire = null)
|
||||
{
|
||||
@@ -98,7 +98,7 @@ class Xcache
|
||||
* 删除缓存
|
||||
* @access public
|
||||
* @param string $name 缓存变量名
|
||||
* @return boolen
|
||||
* @return boolean
|
||||
*/
|
||||
public function rm($name)
|
||||
{
|
||||
@@ -108,7 +108,7 @@ class Xcache
|
||||
/**
|
||||
* 清除缓存
|
||||
* @access public
|
||||
* @return boolen
|
||||
* @return boolean
|
||||
*/
|
||||
public function clear()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user