(keitai-l) Re: Page caching

From: Nick May <nick_at_kyushu.com>
Date: 12/20/00
Message-id: <fc.000f76100004cc6e3b9aca0018f9393e.4cc71@kyushunet.com>
keitai-l@appelsiini.net writes:


>I'm just implementing locally cached dynamic pages to
>	one PHP + MySQL driven dynamic website and it occurred
>	me this could be the answer to your question too

----- snip---------

>       4) Server knows it allready has the page in cache
>           and sends the static local cHTML file as the result
>           without doing any SQL queries or parsing.

----- snip---------

Thanks for digging out my old post - the issue is a very "live" one still.

 I am very interested in the details of your solution as it keeps the work
on the (cheap) webservers (static pages at that) and off the database box.
In particular, how does the server "know"? How exactly does it determine
that it has a static page for that request, then locate that static page
in the file system? If the site has a few thousand unique "pages" there
becomes, potentially, quite a lot to keep track off... Clearly there are
tradeoffs here relating to the complexity of the database hit that would
have been generated against the effort of checking the cache. 

One place to store it is the database I suppose - (it would still be
cheaper than a complex sql hit) but a non-cached page would then create an
additional hit. Or a flat file - that would get expensive real fast for a
lot of pages

Another would be to use the parameters that generate the dynamic sql as
the name of the file, then tell php to look for a file with that name...
That generates  a call to the file system for every page (hit or miss) but
keeps the expense on the webserver, which is OK.

How did you do it, if you do not mind me asking :-)

Nick



[ Did you check the archives?   http://www.appelsiini.net/keitai-l/ ]
Received on Wed Dec 20 15:01:25 2000