Hi,
I am using memcache on windows. I have installed the following version
memcache server:
memcached-win32-1.4.4-54-g136cb6e.zip
And the client gem is:
memcache-client-1.8.5.gem
My App is a JRuby on rails application
I have configured to use memcache through this configuration:
config.cache_store = :mem_cache_store
And i use it normally, a small code snippet is as follows:
def data_cache(key)
unless output = Rails.cache.read(key)
output = yield
Rails.cache.write(key, output)
end
return output
end
However i continuously get the following error in my logs:
MemCacheError (No connection to server (localhost:11211 DEAD
(Errno::EAGAIN: Resource temporarily unavailable - ), will retry at
Mon Jul 26 12:35:23 +0530 2010)): No connection to server (localhost:
11211 DEAD (Errno::EAGAIN: Resource temporarily unavailable - ), will
retry at Mon Jul 26 12:35:23 +0530 2010)
However i get the ouput, but i am not sure if the output is coming
from cache or my backing store ie database.
Also i would like to know how to configure memcache as a write through
cache.
Environment:
Jruby version 1.5.0
Rails version 2.3.5
Postgre SQL database 8.3
apache-tomcat-6.0.26
Thank you