Parent

Methods

Tilt::Cache

Extremely simple template cache implementation. Calling applications create a Tilt::Cache instance and use # with any set of hashable arguments (such as those to Tilt.new):

  cache = Tilt::Cache.new
  cache.fetch(path, line, options) { Tilt.new(path, line, options) }

Subsequent invocations return the already loaded template object.

Public Class Methods

new() click to toggle source
     # File lib/sinatra/tilt.rb, line 322
322:     def initialize
323:       @cache = {}
324:     end

Public Instance Methods

clear() click to toggle source
     # File lib/sinatra/tilt.rb, line 330
330:     def clear
331:       @cache = {}
332:     end
fetch(*key) click to toggle source
     # File lib/sinatra/tilt.rb, line 326
326:     def fetch(*key)
327:       @cache[key] ||= yield
328:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.