[thesite] query results caching

Bob Davis bobd at members.evolt.org
Mon Mar 5 11:05:08 CST 2001


on 3/5/01 11:43 AM, Seth Bienek at seth at sethbienek.com wrote:

> For quick-and-dirty, or simple queries, query caching is probably the way to
> go.  But if you are looking for a way to speed up access to large amounts of
> data, or optimize a heavy-hitting dynamic query, the structure method's
> good.  BTW, it is kind of a pain in the butt to set up; I think that's
> something you have to weigh in the decision to implement it.
> 
> I just re-read that and I think I may have overcomplicated the explaination.
> Lemme know if it's as clear as mud and I'll take another run at it.. :)

Content on the site changes irregularly.  I had a similar situation with an
intranet that I was maintaining.  There were something like 6 queries on
every page, most of which didn't change very often (and they were all
static). When they did change, it was because one of the site administrators
had logged in and done something.
What I did was to create a cacheing time for the queries that was dynamic.
If there was no administrator logged in, the time was 12 hours.  If there
was an administrator logged in, the cache time was 0.  That made sure that
any content that was added was seen immediately, and not x hours after the
update was made.

We could do something similar on evolt.org.  The form action pages for
article submissions, comments, etc. could kick out cache times of 0 for the
queries they change - but only the queries they change.  For instance, when
an admin approves an article, the queries that grab the headlines, the
pending approval list, etc.  All of the stuff in the sidebars that doesn't
change every time someone hits the site could be cached like this.

What do you all think?

bob

-- 

bob davis
bobd at members.evolt.org





More information about the thesite mailing list