dalli

Expiring memcache via regex

旧时模样 提交于 2019-12-10 22:08:13
问题 I'm using memcache in my rails app. I want to say expire all the entries with keys like 'foo-123-*' Where * is any string. Of course, no memcache distribution supports this directly (right?) because it's built to be simple and fast so it doesn't have indexes. There are a couple projects that sort of address this, by keeping a local list of keys: https://github.com/defconomicron/dalli-store-extensions https://github.com/jkassemi/memcache-store-extensions But in keeping the list in memory… that

How to call silence! on dalli cache_store?

孤街浪徒 提交于 2019-12-07 09:30:20
问题 I'm trying to develop application with caching in development mode, but development.log spammed is heavily by cache logs. I'm use dalli, and I know, that dalli has silence! method (https://github.com/mperham/dalli/commit/892020fbc73613ccc84412ce04b85b7fda645e63), but how to use this method? I found some old instructions, where it is suggested to call in on config.cache_store , but it is a symbol, and don't has this method: config.cache_store = :dalli_store config.cache_store.silence! Throws

Rails + Dalli memcache gem: DalliError: No server available

一个人想着一个人 提交于 2019-12-03 10:54:56
Hi I'm having trouble setting up my Rails project on my server because apache keeps complaining DalliError: No server available . I installed memcached on my ubuntu machine, but it still doesn't work. My rails project also has config.cache_store = :dalli_store, 'localhost:11211', { :namespace => "production" } in environments/production.rb. How would I debug this? My log shows before each request: localhost:11211 failed (count: 6) DalliError: No server available telnet to 11211: root@s2:/usr/local/www/production/current/log# telnet localhost 11211 Trying 127.0.1.1... telnet: Unable to connect