Sha256: b0a6d191a914c5d714477999ac75c5fefd5cfb6708305877f3280019ee481669
Contents?: true
Size: 1.29 KB
Versions: 1
Compression:
Stored size: 1.29 KB
Contents
= lacquer Rails drop in for Varnish support. == Install Basic installation rails generate lacquer install config/initializers/lacquer.rb Lacquer.configure do |config| # Globally enable/disable cache config.enable_cache = true # Unless overridden in a controller or action, the default will be used config.default_ttl = 1.week # Can be :none, :delayed_job, :resque config.job_backend = :none # Array of Varnish servers to manage 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.3 | README.rdoc |