High performance memcached client for Ruby.
Questions tagged [dalli]
131 questions
1
vote
1 answer
dalli on heroku not caching
I want to enable action caching in my rails app on heroku.
In development.rb I set:
config.action_controller.perform_caching = true
and see in logs
Started GET "..." for 127.0.0.1 at 2013-05-17 14:03:25 +0400
...
Write fragment ...
OR
Read…

xaxa
- 1,057
- 1
- 24
- 53
1
vote
1 answer
Where to initialise Dalli::Client
I've just started using the Dalli gem for memory caching.
I'm just wondering do I need to create an instance of Dalli::Client in every request if I want to grab some data from the cache or can I declare a singleton which I can reuse?

Gerard
- 4,818
- 5
- 51
- 80
1
vote
1 answer
DalliError: No server available but still write / read fragment
I was checking out my production.log on my server and sees these lines comes every time the code is suspected to read or write cache:
DalliError: No server available
Write fragment views/artists/522-...
DalliError: No server available
Read…

Timmie Sarjanen
- 411
- 4
- 18
1
vote
0 answers
Rails 2 session clobbered some time AFTER variable is stored
I am working on an existing Rails 2 app. I have converted a few of the hash data structures into objects, and if I put one in the session store, it seems to clobber the session, clearing out the user_id, among other things, and forcing another…

Patrick
- 11
- 4
1
vote
1 answer
How can I implement fragment cache with dalli when using pagination (kaminari)?
I know dalli (caching) is pretty powerful plugin to enhance performance for static pages.
But what about dynamic pages with pagination, which are updated quite often?
What is the correct way to set up dalli?
One problem I've encountered for…

MKK
- 2,713
- 5
- 31
- 51
1
vote
1 answer
How should I set up dalli for a dynamic page with lots of content updates?
I know dalli (caching) is pretty useful to enhance performance for static sites.
But what about dynamic sites, which are updated quite often?
What is the correct way to set up dalli?
One problem I've encountered for example: dalli recognizes…

MKK
- 2,713
- 5
- 31
- 51
1
vote
2 answers
rails memcached dalli Marshalling error for key
I have such action in my controller:
def my
@user = Ads::User.find current_user.id
@postings = Rails.cache.fetch("@user.postings.includes(:category)") do
@postings = @user.postings.includes(:category)
end
end
I'm trying to cache @postings…

jizak
- 382
- 2
- 13
1
vote
1 answer
Does Dalli expire caches in all boxes?
According to https://github.com/mperham/dalli, we can configure multiple Memcache servers. But I'm not sure how it works.
Assume that we're using a memcache cluster with two servers: memcache1(box1) and memcache2 (box2).
User A and user B share a…

Blue Smith
- 8,580
- 2
- 28
- 33
1
vote
1 answer
uninitialized constant Dalli (NameError) in staging but not production
So I get a uninitialized constant Dalli (NameError) when I push my ruby on rails app to my staging on heroku, but it works fine in production. my production.rb and staging.rb files are the exact same except for a mailer host value. Could someone…

sambaek
- 213
- 1
- 3
- 10
1
vote
1 answer
Memcached (Dalli) and expiration time for caches_action
I'm using Memcached and Dalli store for my rails app.
Is there a way to set something like expires_in and gzip for caches_action?

CodeOverload
- 47,274
- 54
- 131
- 219
1
vote
1 answer
Connecting to Kestrel using the Dalli gem (or Heroku compatible gems to connect to Kestrel with memcached interface)
I am unable to connect to Kestrel using the Dalli (a memcached client) gem. Is dalli not compatible with kestrel?
require 'dalli'
dc = Dalli::Client.new('localhost:221133')
dc.set('abc', 123)
Doing this from IRB/Pry returns:
I,…

Eli
- 552
- 1
- 6
- 15
1
vote
2 answers
unicorn RuntimeError because of dalli
Unicorn is in a loop and showing the error below:
unicorn error
ERROR -- : Could not find cache store adapter for dalli_store (cannot
load such file -- active_support/cache/dalli_store) (RuntimeError)
production.rb
config.cache_store =…

loco
- 11
- 1
- 2
1
vote
1 answer
showing added weird string when nginx fetches memcached rack result
I'm having a bit of a problem with memcaching the pages generate with my rack app.
I'm storing the page generated by my rack app in memcache with the following bit of (ruby) code:
require 'dalli'
memcached =…

cobaco
- 10,224
- 6
- 36
- 33
1
vote
0 answers
Rails 3.2.6 session[:_csrf_token] different from meta tag
I have a Rails application that I've upgraded from 3.0.7 to 3.2.6. I use Dalli and memcached for my session store.
Since I've upgraded, I've started getting WARNING: Can't verify CSRF token authenticity errors, and my sessions are being reset.
I…

whtt-eric
- 63
- 6
1
vote
1 answer
Rails 3 cache not working. Dalli
development.rb cache configuration
config.action_controller.perform_caching = true
config.cache_store = :dalli_store, 'localhost:11211',
{ :namespace => APP_NAME, :expires_in => 3.month, :compress => true }
production.rb cache…

Ilhom
- 144
- 3
- 12