cache_cache
CacheCache allow you to manage dynamically multiple groups of HTML5 manifests.
Installation
> gem install cache_cache
Basic usage
cache_cache = Rails::CacheCache.new(:group => :my_group) do
cache ActionController::Base.helpers.asset_path("application.css")
cache ActionController::Base.helpers.asset_path("application.js")
network "*"
fallback "/error.html"
save
end
print cache_cache.manifest
Display
CACHE MANIFEST
# generated by cache_cache
CACHE:
/assets/application.css
/assets/application.js
NETWORK:
*
FALLBACK:
/error.html
Hint
Don't forget to active manifest in your rails configuration:
Mime::Type.register_alias "text/cache-manifest", :manifest
in an initializer should be suffisant.