[typo] Abstemious Cache Sweeping

William A. Carrel william.a at carrel.org
Sun Dec 4 13:42:23 EST 2005

On Dec 4, 2005, at 10:08 AM, Piers Cawley wrote:

> Justus Pendleton <justus at ryoohki.net> writes:
>> On 2005-12-04, Piers Cawley <pdcawley at bofh.org.uk> wrote:
>>> So, I'm about to start to add better tracking of cached pages, and I
>>> want to make sure that I've got my flushing rules straight in my  
>>> head,
>>> so I'm brain dumping here. Here's the rules I've worked out so far:
>>> An article is created                    Uncategorized index pages
>> Everything also has a "and maybe flush all pages depending on what
>> sidebars do" requirement.  For instance, I have a sidebar that  
>> lists the
>> 5 most recent posts.  So I need to flush the cache on every article
>> creation.  It sounds like what you need is some way for sidebars to
>> register which actions trigger an update/flush for them.
> Nice idea. The sidebar you're talking about would work fine with a
> 'nuke everything on article creation' approach, but that's not going
> to be the case for all such sidebars (5 most 'active' posts for
> instance).

Sadly, sidebar plugins like del.icio.us and flickr need to be updated  
based on an external event that we're probably never going to get  
notification of.  On the other hand, since these sidebar plugins have  
to do a round-trip to another website they're the ones that benefit  
the most from having their content cached.  Periodic flushing of  
these seems to be the model that works best, but it's lame to lose  
your whole article cache every N minutes because of the sidebar changes.

> Personally, I become more and more convinced that we need to have some
> way of doing ajax rendering of sidebars. Or fragment caching, which
> brings its own set of problems because you have to track fragment
> dependencies.

I agree, hence ticket #345 is the former solution for the whole  
sidebar.  It seems to behave itself w.r.t. Google AdSense and other  
things now.  You can see it in action at www.carrel.org.  Another  
approach that I had thought about was sticking the sidebar content in  
the appropriate div and then overwriting it with AJAX, so the sidebar  
at least sort of works for people JS turned off.  I think the N AJAX  
loads for N sidebar plugins approach was soundly rejected last time  
it came up because of the flicker/leap effect it will have on the  
page rendering.  Of course all of this requires cron or something  
equivalent to deal with the periodic cache flush.

Last time Scott talked about fragment cache it sounded like it cost  
about an order of magnitude in performance versus the page cache.


More information about the Typo-list mailing list