开发者

Avoid logging Memcached requests in Rails

开发者 https://www.devze.com 2023-03-25 22:41 出处:网络
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

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

精彩评论

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