This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
commit 35f69f630a90dc19af3ec21a4f329d17a85bd152
tree 216b52eade65f06ce672a096dd513efa5acabb8b
parent 37965893d3a176d8875845e92851e1b1f7dde74c
tree 216b52eade65f06ce672a096dd513efa5acabb8b
parent 37965893d3a176d8875845e92851e1b1f7dde74c
| name | age | message | |
|---|---|---|---|
| |
.gitignore | ||
| |
LICENSE | ||
| |
README.markdown | ||
| |
Rakefile | ||
| |
lib/ | ||
| |
spec/ |
README.markdown
Merb cache observer
A plugin for the Merb framework that provides easy integration of model observers for DataMapper which will expire caches. Based on Cache watch by nutrun.
Works on page caches for now. The cache is expired when the provided model class is saved or destroyed.
Imagine we have a People controller with an index page shortly listing all people in the system. The show page lists detailed account information for any person. We then want to invalidate the page cache for the index page when the person model is changed.
class People < Merb::Controller
cache_pages :index, :show
observe_pages [:index, Person], [:show, Person, Account]
end
There is also a singular counterpart to cache_page:
class Entries < Merb::Controller
cache_page :index
observe_page :index, Entry, Comment
end








