Module: Sinatra::Cache
- Defined in:
- lib/nesta/cache.rb
Overview
Sinatra Caching module
TODO:: Need to write documentation here
Defined Under Namespace
Modules: Helpers
Constant Summary
- VERSION =
'Sinatra::Cache v0.2.0'
Class Method Summary (collapse)
-
+ (Object) registered(app)
Sets the default settings:.
- + (Object) version
Class Method Details
+ (Object) registered(app)
Sets the default settings:
* +:cache_enabled+ => toggle for the cache functionality. Default is: +true+
* +:cache_page_extension+ => sets the default extension for cached files. Default is: +.html+
* +:cache_dir+ => sets cache directory where cached files are stored. Default is: ''(empty) == root of /public.<br>
set to empty, since the ideal 'system/cache/' does not work with Passenger & mod_rewrite :(
* +cache_logging+ => toggle for logging the cache calls. Default is: +true+
* +cache_logging_level+ => sets the level of the cache logger. Default is: <tt>:info</tt>.<br>
Options:(unused atm) [:info, :warn, :debug]
125 126 127 128 129 130 131 132 |
# File 'lib/nesta/cache.rb', line 125 def self.registered(app) app.helpers(Cache::Helpers) app.set :cache_enabled, true app.set :cache_page_extension, '.html' app.set :cache_dir, '' app.set :cache_logging, true app.set :cache_logging_level, :info end |
+ (Object) version
12 |
# File 'lib/nesta/cache.rb', line 12 def self.version; VERSION; end |