search for: post_cache

Displaying 2 results from an estimated 2 matches for "post_cache".

Did you mean: dst_cache
2006 May 25
1
New BackgrounDRb release
...control the drb server is caching. You can now use BackgrounDRb as a full fledged in memory cache for any type of object that can be Marshal''ed. Here''s a peek: To cache an object you can do it two ways. @posts = Post.find(:all, :include => :comments) MiddleMan.cache_as(:post_cache, @posts) OR MiddleMan.cache_as :post_cache do Post.find(:all, :include => :comments) end And to retrieve 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 emp...
2006 Jul 01
9
BackgrounDRb New release.
...:args => "Bar", :ttl => 300) # 300 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 t...