Clint Webb wrote:
On Sun, May 3, 2009 at 8:58 AM, Les Mikesell <[email protected]> wrote:

Clint Webb wrote:

Rather than using memcached as a global site cache (which it is not really
designed to be), you might have more success actually using it the way it
was intended.

Which means as an object cache inside your code.

Otherwise you are just going to be doing a lot of effort to get a square
peg
to fit in a round hole.

There's not really anything wrong with using it as a page cache as well.
 You just can't set the expire time on pages to a time past when they will
change.


On dynamic sites where you have to either delete your entire cache whenever
any changes are made to a single page, or you must go through extraordinary
measures to get around that limitation there certainly is.

If you can break what looks like a dynamic page into iframes that hold versioned contents, you can still cache a large percentage of the content at the http level.

You are right that there are cases where using it as a cache is
appropriate.  Actually I have used it to cache entire pages that are
dynamically generated, but not changed once generated....   Other than that,
I cant think of a good use for it where other solutions aren't better.

It doesn't have to be an either/or proposition. If you have a page frame that is uncached or has a short expire time, the underlying app just has to compute the appropriate urls to the cachable but versioned parts and you only have to generate those once.

--
  Les Mikesell
    [email protected]

Reply via email to