mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 15:12:48 +08:00
改进Query类的find和select方法对cache的处理
This commit is contained in:
@@ -1602,7 +1602,7 @@ class Query
|
|||||||
}
|
}
|
||||||
|
|
||||||
$resultSet = false;
|
$resultSet = false;
|
||||||
if (!empty($options['cache'])) {
|
if (empty($options['fetch_sql']) && !empty($options['cache'])) {
|
||||||
// 判断查询缓存
|
// 判断查询缓存
|
||||||
$cache = $options['cache'];
|
$cache = $options['cache'];
|
||||||
$key = is_string($cache['key']) ? $cache['key'] : md5(serialize($options));
|
$key = is_string($cache['key']) ? $cache['key'] : md5(serialize($options));
|
||||||
@@ -1683,7 +1683,7 @@ class Query
|
|||||||
|
|
||||||
$options['limit'] = 1;
|
$options['limit'] = 1;
|
||||||
$result = false;
|
$result = false;
|
||||||
if (!empty($options['cache'])) {
|
if (empty($options['fetch_sql']) && !empty($options['cache'])) {
|
||||||
// 判断查询缓存
|
// 判断查询缓存
|
||||||
$cache = $options['cache'];
|
$cache = $options['cache'];
|
||||||
$key = is_string($cache['key']) ? $cache['key'] : md5(serialize($options));
|
$key = is_string($cache['key']) ? $cache['key'] : md5(serialize($options));
|
||||||
|
|||||||
Reference in New Issue
Block a user