0.0
No commit activity in last 3 years
No release in over 3 years
Ruby cache methods built on top of Rails and Sinatra caching.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
~> 1.0.4
~> 2.6.0
 Project Readme

CacheStoreApi

lazy_cache

Lazily cache the contents of the block. It takes the cache key and time to expiration as arguments.

CacheStoreApi.lazy_cache("cache-key", 1.week) do
  @my_expensive_models = Model.all(:conditions => "some-expensive-query")
  render_to_string(:template => "my/template/path/index.html")
end.tap do |html|
  render :text => html
end

expire

Expires the given cache key.

CacheStoreApi.expire("cache-key")

cache

Access to the raw cache object.

CacheStoreApi.cache.instance_variable_get("@pool")