Content management and caching

From: Markus Ernst (derernst_at_NO#SP#AMgmx.ch)
Date: 10/14/04


Date: Thu, 14 Oct 2004 19:20:38 +0200

Hi

I use PEAR Cache to cache the frontend pages of a content managed web site.
Now I update the contents of a page, and of course the updated contents will
only be displayed after the expiring period of the cached file.

After thinking and googling a lot I see several possible approaches to for
handling this, each of which has it's downsides:

- Use a very short expiring period. (Downside: Makes caching only relevant
at very high visitor frequencies.)

- Change database, add modification date to every record - and compare
creation date of cache files with modification dates of contents. (Huge
overhead; must first detect which tables and records the page uses at all.)

- Flush cache everytime an admin page is called, or within the insert,
update, publish etc functions. (Empties whole cache also if only a comma is
changed.)

- Provide an "flush cache" button for the administrator to use after
finishing changes. (Administrator will forget it.)

I would appreciate any better ideas or comments, thank you.

-- 
Markus