class Sinatra::TemplateCache

Implementation copied from Tilt::Cache.
key#hash and key#eql? should not change.
being passed to #fetch. More specifically, the values returned by
* Keys are not copied defensively, and should not be modified after
* Size is unbounded.
* Not thread-safe.
Extremely simple template cache implementation.

def clear

Clears the cache.
def clear
  @cache = {}
end

def fetch(*key)

which may be nil, is cached under key and returned.
returned. Otherwise, block is yielded to and its return value
If a value has been previously cached for key then it is
Caches a value for key, or returns the previously cached value.
def fetch(*key)
  @cache.fetch(key) do
    @cache[key] = yield
  end
end

def initialize

def initialize
  @cache = {}
end