High performance memcached client for Ruby.
Questions tagged [dalli]
131 questions
0
votes
0 answers
Rails - Dalli Elasticache not able to connect to server
Not able to connect to web server when ElastiCache in-transit encryption (TLS) is enabled at elasticsearch
cache_endpoint = ENV['M_SERVERS']
cache_options = {
:compress => true
}
elasticache = Dalli::ElastiCache.new(cache_endpoint)
…

Kunal Vashist
- 2,380
- 6
- 30
- 59
0
votes
0 answers
Rails 6.1 upgrade: undefined method reset for ActiveSupport::Cache::MemCacheStore
I'm upgrading a legacy rails app from 5.2 to 6.1 and it looks like there were some changes to the config for cache_store and I'm now getting ERROR -- : undefined method 'reset' for #

Sparkmasterflex
- 1,837
- 1
- 20
- 33
0
votes
0 answers
ActionView::Template::Error: can't dump File
Recently we had the error while upgrading flipper gem Removes:dalli_store. Use Rails' official:mem_cache_store instead. https://guides.rubyonrails.org/caching_with_rails.html. So we changed cache store from dalli to mem_cache_store. After upgrade,…

Siva Gollapalli
- 626
- 6
- 20
0
votes
1 answer
Running delayed worker ends up with Dalli error
Here gem and rails versions:
Gems:
delayed_job (4.1.5)
dalli (2.7.8)
memcached -h | head -1
memcached 1.4.25
Rails
Rails 5.1.5
I run the delayed worker via this file ./bin/delayed_job run
which looks like this:
require…

Hairi
- 3,318
- 2
- 29
- 68
0
votes
1 answer
127.0.0.1:11211 is down party_manager | DalliError: No server available
I am using docker. Whenever my application is trying to read or write the cache it is getting following error :
Cache read: send_otp_request_count_3
Dalli::Server#connect 127.0.0.1:11211
127.0.0.1:11211 failed (count: 0) Errno::ECONNREFUSED:…

Sourabh Banka
- 1,080
- 3
- 24
- 48
0
votes
1 answer
Rails / Dalli: expire fragment from another namespace
I have two apps connecting to memcached servers on different namespaces, for example's sake we'll call them "admin" and "users".
Every now and then I want to expire some fragments in the "users" namespace from the admin application.
Note: I am not…

Nick M
- 2,424
- 5
- 34
- 57
0
votes
1 answer
Rails cache get all values of a hash
I have a rails application where I am implementing caching using memcached and dalli.
I am storing results in hash like this
Rails.cache.write("home_stays[#{home_stay['id']}]", home_stay, expires_in: 5.minutes)
I can fetch value for a particular…

RamanSM
- 275
- 3
- 13
0
votes
0 answers
Issue with Dalli not working as expectd?
I have a simple rails app and I am trying to save and retrieve keys from a memcache box, which was working for a long time unless we started encountering the error below, I have tried debugging this but will need someone to help now
[2015-10-28…

AaShish Upadhyay
- 243
- 3
- 12
0
votes
1 answer
How does Rails fragment caching work?
I have just started using caching in a production application to speed things up. I've read the primary Rails guide, various blogs, the source itself, etc. But my head is still not clear on one simple thing when it comes to fragment caching:
When…

notaceo
- 1,093
- 10
- 28
0
votes
1 answer
getting unanted charcaters in cache value using dalli
I am trying to read the cache value set in Rails.cache , i am working on rails 3.1 and using dalli.
When i execute this block i am getting some unwanted characters in response
Here is the code block
@total_count = Rails.cache.fetch(count_key){
…

opensource-developer
- 2,826
- 4
- 38
- 88
0
votes
1 answer
Can't read key from memcached using dalli
dalli refuses to connect and read from a remote memcached server, but telnet works just fine.
I have connected to a remote server via SSH, and forwarded a memcached port over to my machine like this:
Host access.production
HostName 1.2.3.4
…

oldhomemovie
- 14,621
- 13
- 64
- 99
0
votes
1 answer
Rails: Invalidate cache based on query results
I've got query in my Rails application that doesn't take long to run (~180ms), but does return a lot of results. The result is used in an API, and the transformation of the result to JSON is expensive (~3s). To speed things up, I'm caching it like…

Sam Starling
- 5,298
- 3
- 35
- 52
0
votes
1 answer
Can't write to Dalli Store from Rails Console
I use Rails 3.2.14, Ruby 2.1.2 and Memcached 1.4.13 on my Mac. I setup dalli as described here: https://github.com/mperham/dalli
Unfortunately trying Rails.cache.write(:foo, 1) returns false and thus Rails.cache.read(:foo) returns nil.
What am I…

floriansuchan
- 255
- 4
- 13
0
votes
0 answers
How to clear memcached for multiple servers in rails
My Rails app is sharing two servers, one for users and the other for admin. I have added dalli-memcached for user interface and cache gets expires if it updates anything, which is working fine.
But I want to clear the cache from the admin server…

bunty
- 1,068
- 6
- 17
0
votes
1 answer
require 'dalli' returns false in the console, although it is in the gemfile
Following https://devcenter.heroku.com/articles/memcachier#ruby
I added memcachier and dalli gems, and did a bundle install
then I ran the console
and I typed
require 'dalli'
and it returns false
and I can't tell why, it also does this in a staging…

bezzoon
- 1,755
- 4
- 24
- 52