Class: Tilt::Cache
Overview
Extremely simple template cache implementation. Calling applications create a Tilt::Cache instance and use #fetch with any set of hashable arguments (such as those to Tilt.new):
cache = Tilt::Cache.new
cache.fetch(path, line, ) { Tilt.new(path, line, ) }
Subsequent invocations return the already loaded template object.
Instance Method Summary collapse
- #clear ⇒ Object
- #fetch(*key) ⇒ Object
-
#initialize ⇒ Cache
constructor
A new instance of Cache.
Constructor Details
#initialize ⇒ Cache
Returns a new instance of Cache.
122 123 124 |
# File 'lib/vendor/tilt-1.4.1/lib/tilt.rb', line 122 def initialize @cache = {} end |