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 (
Penso Fabien (author)
Sun May 25 04:05:20 -0700 2008
commit a3f29fadd89808d9198cd4616fa6e90ac07f95c5
tree 47ef4d18f3b4d410a490ce8d046a29a6c60479d5
parent 7204ee905554f4b131cb17b90ea4752455c936f4
tree 47ef4d18f3b4d410a490ce8d046a29a6c60479d5
parent 7204ee905554f4b131cb17b90ea4752455c936f4
CachesPageFix
=============
Rails caches_page is broken, it has RACE condition bugs and is not really
efficient. If you don't think so then maybe this plugin is not for you.
How broken ? Example : you have 3 mongrel processes, caches_page for
/controller/something and the static file does not exist yet. If you have 3
connections at the same time for that specific page, you'll end up having 3
mongrel processes for generating the exact same page...
This plugin creates a .lock so the other mongrel processes wait for the first
one to deliver the page (except if the .lock is too old, then it removes it and
start again).
Example
=======
There are 2 ways to use this cache, you can use them in your controller like :
class SiteController < ApplicationController
smart_caches_page :index
end
Or you can activate it in the routes with a :cache => true parameter
Copyright (c) 2008 [Fabien Penso], released under the MIT license












