mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 07:12:47 +08:00
数据库和缓存读写计数调整 增加页面Trace日志驱动(需要设置'response_exit'=>false) Log::record方法支持字符串之外的变量输出
This commit is contained in:
2
library/think/cache/driver/db.php
vendored
2
library/think/cache/driver/db.php
vendored
@@ -55,6 +55,7 @@ class Db
|
||||
*/
|
||||
public function get($name)
|
||||
{
|
||||
\think\Cache::$readTimes++;
|
||||
$name = $this->options['prefix'] . addslashes($name);
|
||||
$result = $this->handler->query('SELECT `data`,`datacrc` FROM `' . $this->options['table'] . '` WHERE `cachekey`=\'' . $name . '\' AND (`expire` =0 OR `expire`>' . time() . ') LIMIT 0,1');
|
||||
if (false !== $result) {
|
||||
@@ -81,6 +82,7 @@ class Db
|
||||
*/
|
||||
public function set($name, $value, $expire = null)
|
||||
{
|
||||
\think\Cache::$writeTimes++;
|
||||
$data = serialize($value);
|
||||
$name = $this->options['prefix'] . addslashes($name);
|
||||
if (function_exists('gzcompress')) {
|
||||
|
||||
Reference in New Issue
Block a user