High performance memcached client for Ruby.
Questions tagged [dalli]
131 questions
0
votes
1 answer
Calling DC.flush_all clears the whole cache, also when using Passenger?
I am using Phusion passenger and memcached (Dalli Gem). I want to clear the complete cache (similar to running telnet localhost 11211 and then running flush_all on the telnet command).
Is it save to run:
DC.flush_all
in a forked Phusion passenger…

KKK
- 1,085
- 11
- 33
0
votes
1 answer
Why call super twice in ruby contsructor/initialize method?
I was reading through Dalli's source code and I found this...
module ActionDispatch
module Session
class DalliStore < AbstractStore
def initialize(app, options = {})
# Support old :expires option
options[:expire_after]…

A-Dubb
- 1,670
- 2
- 17
- 22
0
votes
1 answer
Can Rails use same memcached instance for data_store and session_store?
what happen when I use one memcached instance for session_store and cache_store?
For example:
config.cache_store = :dalli_store, 'localhost:11211'
config.session_store = :dalli_store, 'localhost:11211'
Can full cache_store remove sessions from…

user1657173
- 231
- 1
- 2
- 9
0
votes
1 answer
dalli session store
I have been googling for a long time and haven't find a solution yet. I am using Rails 3.2 and the Dalli gem with memcached 1.4.14.
I would like to use Dalli/Memcached as the session store but I dont know how to do that. Now, Dalli cache works like…

smonty
- 73
- 4
- 7
0
votes
2 answers
Rails cache not expiring
For some reason the following doesn't expire after 10 seconds
def rcache_value
@random_val_from_cache = Rails.cache.fetch("random_val_from_cache",:expires_in=>10.seconds) do
rand 10000
end
I output @random_val_from_cache in my footer of my app.…

K2xL
- 9,730
- 18
- 64
- 101
0
votes
2 answers
Does Dalli only cache strings? (newbie to memcache)
If that's the case, then is it best to store stuff as JSON?
I looked in the documentation, but its not explicitly acknowledged.

Tom Andersen
- 7,132
- 3
- 38
- 55
0
votes
2 answers
Store Twitter timeline in cache (using Sinatra)?
I'm making a basic Sinatra application to display a user's Twitter mentions timeline using the Twitter gem. After logging in, I fetch his/her mentions. Something like:
get '/' do
@mentions = Twitter.mentions_timeline
erb :home
end
The issue…

tonic
- 453
- 1
- 6
- 21
0
votes
1 answer
Group data by Namespace in memcache
In one of our application we want to store different type of objects in Memcache server using dalli client.
One type of data is to store rails session value which needs to be flushed when user log out.
Another set of data is some objects which we…

Nidhi
- 340
- 2
- 10
0
votes
1 answer
Rails 3, Caching object in one request does not last to the next request
I am writing an object to cache using
class Foo
attr_accessor :bar
end
foo = Foo.new
foo.bar = "123"
Rails.write "key", foo
When I call
Rails.read "key"
in the same request - the object is retrieved.
However when I call it on an other…

Tor
- 595
- 2
- 10
-1
votes
1 answer
`rescue in retrieve_store_class': Could not find cache store adapter for dalli_store
Used versions below
rails 5.2.8
ruby 2.3.1
dalli 3.0.4
I receive the following error:
cache.rb:110:in `rescue in retrieve_store_class': Could not find cache store adapter for dalli_store (cannot load such file -- active_support/cache/dalli_store)…

vikasrb
- 1
- 2
-3
votes
1 answer
Does ruby Dalli gem support auto-heal/auto-reconnect by default
Does ruby Dalli gem support auto-heal/auto-reconnect by default?
or
is there a way to enable auto-heal/auto-reconnect?

Sushma Satish
- 2,363
- 2
- 20
- 23