class Angelo::Templates::TemplateCaching::Cache

A pull request has been accepted for Tilt which makes Tilt::Cache work like our Cache so we can remove this when a new Tilt gem is released (currently 2.0.1), but Tilt doesn't seem to be getting much love these days.

Public Class Methods

new() click to toggle source
# File lib/angelo/templates.rb, line 90
def initialize
  @cache = {}
end

Public Instance Methods

fetch(*key) { || ... } click to toggle source
# File lib/angelo/templates.rb, line 94
def fetch(*key)
  @cache.fetch(key) do
    @cache[key] = yield
  end
end