search for: cache_get

Displaying 3 results from an estimated 3 matches for "cache_get".

2006 May 25
1
New BackgrounDRb release
...ve the cache you can either just grab it and if there is nothing there it will return nil. Or you can supply a block that the contents of will get placed in the cache if the cache is empty. This is for fallback in case the cache is empty This will return nil if the cache is empty: MiddleMan.cache_get :post_cache Or the shorthand cache_get MiddleMan[:post_cache] This will refill the cache with the contents of the block if the cache is empty. Otherwise it will just return whats in the cache: MiddleMan.cache_get :post_cache do Post.find(:all, :include => :comments) end Hope people get...
2006 Jul 01
9
BackgrounDRb New release.
...0 seconds == 5 minutes #caching #fill_cache, expire in 5 minutes @posts = Post.find(:all, :include => :comments) MiddleMan.cache_as(:post_cache, 300, @posts) #OR @posts = MiddleMan.cache_as :post_cache, 300 do Post.find(:all, :include => :comments) end #retrieve_cache @posts = MiddleMan.cache_get :post_cache do Post.find(:all, :include => :comments) end By default the timer_sleep is set to 60 seconds. This means that the timer will wakeup every 60 seconds and delete caches and worker that are past their time to live. You can change this in the config file if you want it to run...
2010 Feb 06
4
500 Internal Error
...o::ECONNREFUSED: Connection refused - connect(2)), will retry at Fri Feb 05 19:05:38 +0200 2010) /usr/local/lib/ruby/gems/1.8/gems/memcache-client-1.7.7/lib/ memcache.rb:855:in `with_socket_management'' /usr/local/lib/ruby/gems/1.8/gems/memcache-client-1.7.7/lib/ memcache.rb:732:in `cache_get'' /usr/local/lib/ruby/gems/1.8/gems/memcache-client-1.7.7/lib/ memcache.rb:253:in `get'' /usr/local/lib/ruby/gems/1.8/gems/memcache-client-1.7.7/lib/ memcache.rb:878:in `with_server'' /usr/local/lib/ruby/gems/1.8/gems/memcache-client-1.7.7/lib/ memcache.rb:251:in...