High performance memcached client for Ruby.
Questions tagged [dalli]
131 questions
2
votes
0 answers
In a Rails 5.1 Dalli store (cache), S3 images are breaking after a certain amount of time
I've set up Dalli as a cache store and have memcached running. After a certain amount of time, I'll end up with broken S3 images (everything else still loads correctly).
Relevant lines from production.rb:
config.action_controller.perform_caching =…

John Athayde
- 580
- 2
- 13
2
votes
0 answers
In dally gem, "socket_max_failures" options in not working for write and read operations
I am using dalli 2.7.0.
I faced a problem where the memcache instance became unreachable. When a set request was triggered, it should have timed out in 0.5 seconds (the default timeout), instead the dalli client kept retrying.
On further…

Tholkappiyan Velavan
- 31
- 1
2
votes
1 answer
How to cache Weather (Nokogiri::XML::NodeSet object) in Memcache?
I'm trying to cache Weatherman's response (https://github.com/dlt/yahoo_weatherman) in Memcache to avoid fetching weather multiple times, I am doing:
weather = Rails.cache.fetch([:weather_by_woeid, weather.woeid], expires_in: 1.hour) do
client…

Hackeron
- 616
- 7
- 14
2
votes
1 answer
Memcached / Dalli couldn't fetch data from other servers
We use memcached as session store for our application, we have 2 production servers and the memcached client is dalli (https://github.com/mperham/dalli). The config is following:
# Server A
config.cache_store = :dalli_store, '127.0.0.1',…

VinhBS
- 677
- 8
- 17
2
votes
2 answers
Rails 4.2 fragment caching isn't working
I'm trying to fragment cache a static portion of my site, but it doesn't seem to be working at all. I've set up config/application.rb with the following:
config.action_controller.perform_caching = true
config.cache_store = :dalli_store
In my view,…

mrdziuban
- 749
- 3
- 11
- 23
2
votes
1 answer
ECONNREFUSED: Connection Refused localhost:11211 - Dalli / Memcachier / Heroku
So on heroku I am getting this issue. I can't quite figure out why this is happening.
heroku run rails c
> cache = Dalli::Client.new
> Rails.cache.write('memcachier', 'rocks')
Dalli::Server#connect localhost:11211
localhost:11211 failed (count:…

bezzoon
- 1,755
- 4
- 24
- 52
2
votes
1 answer
Increasing from 1 Dyno to 2 creates authenticity_token error
I am new to rails and heroku and have created a basic app. I have been playing around in Heroku for the last couple of weeks using just 1 dyno. Now I have increased to two and am getting CSRF errors because the authenticity token is being reset…

Jay Killeen
- 2,832
- 6
- 39
- 66
2
votes
0 answers
Dalli Network Error with Rails
I am running through the below problem in my test server, where I have done memcached to site, but sometimes it throws error page. Below is description of the error. I have googled for it not getting any solution. Error:
Cache read:…

Vijay Sali
- 1,030
- 2
- 14
- 32
2
votes
1 answer
Ruby on Rails caching with memcache and Dalli doesn't seem to work
so I implemented some caching on my page that runs on rails 3.3 but when I look into the production log I see this:
Read fragment views/#_big_2 (0.8ms)
Write fragment views/#_big_2 (0.5ms)
Read fragment…
user287689
2
votes
1 answer
How can I prevent the odd insertion of :@new_record when cache hits in Dalli?
I'm implementing caching on Heroku using Dalli and Memcachier, and when I get a cache hit it's adding a Symbol to the returned array (or hash, in a different example). This Symbol, :@new_record, has nothing that I know of to do with the results I'm…

Matthew Du Pont
- 187
- 1
- 1
- 13
2
votes
2 answers
Connection error when running memcached with dalli
I'm having trouble connecting to a Memcached server running on localhost from Dalli. I have been using Dalli with the Memcachier Heroku add-on for a while without any problems though I don't have any experience running Memcached locally.
I…

Ricky Stewart
- 1,102
- 1
- 8
- 18
2
votes
1 answer
How to configure identity_cache gem to use dalli store?
Could not find the documentation to configure identity_cache to work with dalli. Could someone tell me how that's done?
I tried this in my config/environments/development.rb (I wanted to try this in development environment…

hau
- 91
- 1
- 6
2
votes
1 answer
How to clear the cache for all the pages when we use pagination
We use dalli gem w/memcached. The following code caches Foo objects paginated across multiple pages. We are able to cache Foo(s) when we are in a certain page (say 2 or 10 or 15). But when I modify a Foo in page 15 (say Foo-150), we clear the cache…

Mano
- 979
- 1
- 18
- 36
2
votes
1 answer
Mute Rails memcache logging in development env
Would like to mute large amount of dalli output in development log & STOUT.

Daniel Morris
- 6,852
- 8
- 25
- 30
2
votes
2 answers
Fragment cache can't modify frozen object error rails 3
I am trying to implement fragment caching in a Rails 3.0.19 application and ussing dalli as cache store. Here is my cache fragment script:
- @presentations.each do |p|
- cache "presentation", p do
= render_presentation_object…

Nazar Hussain
- 5,102
- 6
- 40
- 67