CacheCache allow you to manage dynamically multiple groups of HTML5 manifests.
> gem install cache_cache
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"
end
print cache_cache.manifest
Display
CACHE MANIFEST
# generated by cache_cache
CACHE:
/assets/application.css
/assets/application.js
NETWORK:
*
FALLBACK:
/error.html
Don't forget to active manifest in your rails configuration:
Mime::Type.register_alias "text/cache-manifest", :manifest
in an initializer should be suffisant.