2

我最近安装了cache-money。在设置 memcached 和 cache-money 遇到一些困难之后,我认为我已经成功了。它在我的登录页面上缓存了一个查询。我登录,然后转到我的消息索引页面并收到此错误:

indices delegated to @cache_config.indices, but @cache_config is nil: Slug(id: integer, name: string, sluggable_id: integer, sequence: integer, sluggable_type: string, scope: string, created_at: datetime)

搜索该错误消息的第一部分在 Google 上返回 0 次点击,所以我什至不知道从哪里开始。有什么建议么?

4

2 回答 2

1

我认为您可能错过了在 Message 模型中设置索引。Cache Money 将自动为 id 之类的字段工作,否则您需要自己设置它们。

class Message < ActiveRecord::Base
  index [:subject, :body, :sender]
end
于 2009-08-13T16:24:10.380 回答
0

2 周前,friendly_id 方认识到了这个问题,并在使用friendly_id 之前先将其关闭以由缓存资金方修复:

http://github.com/norman/friendly_id/issues/closed#issue/33

因此,您暂时必须不使用这两个插件之一。

于 2010-01-09T19:14:25.830 回答