Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A system for spiffy declarative caching.

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 rails
Octocat-spinner-32 script
Octocat-spinner-32 test
Octocat-spinner-32 .gitignore
Octocat-spinner-32 CHANGELOG
Octocat-spinner-32 README.textile
Octocat-spinner-32 Rakefile
Octocat-spinner-32 TODO.textile
Octocat-spinner-32 VERSION
Octocat-spinner-32 cache_advance.gemspec
README.textile

cache advance

CacheAdvance is a wrapper around the Rails caching system that provides a simple, centralized
configuration file for defining caches and an even simpler way to apply them.

Written by Aubrey Holland.

download

Github: Page

Gem:

gem install aub-cache_advance —source http://gems.github.com

Note: if you install using the gem from Github, you’ll need this
in your environment.rb if you want to use Rails 2.1’s dependency manager:


config.gem 'aub-cache_advance', :lib => 'cache_advance', :source => 'http://gems.github.com'

cache definition

Caches are defined in the file config/caches.rb, which will be loaded automatically by the gem.
This file is similar in format to the rails routes config file, allowing you to specify named
caches and configure their keys and how they will be expired.


CacheAdvance::Caches.define_caches do |config|

  config.qualifier(:params) do |request|
    request.params
  end

  config.plugin :template_handler_observer_cache_plugin

  config.content_block :expiration_time => 10.minutes, :qualifiers => [ :subdomain, :params ]

  config.change_towns_all :expiration_types => [ :publication ]
  config.change_towns_limited :expiration_types => [ :publication ]

  config.publication_twitter_update :expiration_time => 10.minutes, :qualifiers => [ :subdomain ]

  config.weather_widget :expiration_time => 10.minutes, :qualifiers => [ :subdomain ]
end

…………..More later.

Something went wrong with that request. Please try again.