开发者

Avoid logging Memcached requests in Rails

I have a Rails daemon which polls a memcached value every 0.01 sec, and I'd like to prevent these read requests from being logged. Is there a way to disable the logging of certain reads explicitly, or for the memcach开发者_Go百科ed from Rails as a whole?


Rails.cache.mute { Rails.cache.read(:key) }

seems to do the trick.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜