gpt4 book ai didi

php - octobercms 数据库查询缓存不工作

转载 作者:行者123 更新时间:2023-11-29 03:22:26 24 4
gpt4 key购买 nike

在我的一个页面中,我像这样执行数据库查询..

function onStart()
{
$this['numz'] = Db::table('backend_users')->select('id')->count();
}

这按预期工作并返回一个值,我可以像这样在页面中使用

There are a total of {{ numz }} ppl.

现在根据this ,我们应该能够做到......

function onStart()
{
$this['numz'] = Db::table('backend_users')->select('id')->remember(10)->count();
}

然而,每当我尝试这样做时,我都会收到以下错误;

Call to undefined method Illuminate\Database\Query\Builder::remember()

知道问题是什么还是这是一个错误?

最佳答案

这是一个错误,现在已在 build 398+ 中修复。

https://github.com/octobercms/october/issues/2639

关于php - octobercms 数据库查询缓存不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41940908/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com