mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-09-02 05:31:36 +08:00
Query类的update和delete方法支持调用cache方法 会自动清除指定key的缓存 配合查询方法的cache方法一起使用 Model类的get方法第三个参数传入true的时候会自动更新缓存
This commit is contained in:
@@ -985,9 +985,6 @@ abstract class Model implements \JsonSerializable, \ArrayAccess
|
||||
*/
|
||||
public static function get($data = null, $with = [], $cache = false)
|
||||
{
|
||||
if (!$cache && $data && is_scalar($data)) {
|
||||
$cache = true;
|
||||
}
|
||||
$query = static::parseQuery($data, $with, $cache);
|
||||
return $query->find($data);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user