Cache

botanicus edited this page Sep 13, 2010 · 6 revisions

rack-cache

HTTP Caching

http://github.com/botanicus/rango/blob/master/lib/rango/mixins/http_caching.rb
http://github.com/botanicus/rango/blob/master/spec/rango/mixins/http_caching_spec.rb
http://github.com/botanicus/rango/issues#issue/47

HTTP Etag & Last Modified
Template Rendering

Primitive in-memory caching

class Product < Sequel::Model
  def all
    @@all ||= super
  end

  def before_update
    @@all = nil
    super
  end
end

http://railscasts.com/episodes/115-caching-in-rails-2-1