Oxyless / cache_cache

(Rails) CacheCache allow you generate HTML5 manifests.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cache_cache

CacheCache allow you to generate HTML5 manifests.

Installation

> gem install cache_cache

Basic usage

cache_cache = Rails::CacheCache.new() 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

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.

About

(Rails) CacheCache allow you generate HTML5 manifests.

License:MIT License


Languages

Language:Ruby 100.0%