【问题标题】:octobercms database query cache not workingoctobercms 数据库查询缓存不起作用
【发布时间】:2017-06-15 21:43:59
【问题描述】:

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

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();
}

但是当我尝试这个时,我得到以下错误;

调用未定义的方法 Illuminate\Database\Query\Builder::remember()

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

【问题讨论】:

    标签: php mysql caching octobercms


    【解决方案1】:

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

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-05-12
      • 1970-01-01
      • 2015-11-15
      • 1970-01-01
      • 1970-01-01
      • 2012-03-02
      相关资源
      最近更新 更多