Sha256: ffcee0470ae80c334972cba10ff588bb69130bf0eacda52f45ef27e903fe078b
Contents?: true
Size: 1.04 KB
Versions: 1
Compression:
Stored size: 1.04 KB
Contents
= lacquer Rails drop in for Varnish support. == Install Basic installation rails generate lacquer config/initializers/lacquer.rb Lacquer.configure do |config| config.enable_cache = true config.default_ttl = 1.week config.varnish_servers << { :host => '0.0.0.0', :port => 6082 } end app/controllers/application_controller.rb class ApplicationController < ActionController::Base include Lacquer::CacheUtils end == Usage To set a custom ttl for a controller: before_filter { |controller| controller.set_cache_ttl(15.minutes) } == Note on Patches/Pull Requests * Fork the project. * Make your feature addition or bug fix. * Add tests for it. This is important so I don't break it in a future version unintentionally. * Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull) * Send me a pull request. Bonus points for topic branches. == Copyright Copyright (c) 2010 Russ Smith. See LICENSE for details.
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
lacquer-0.2.0 | README.rdoc |