|
Posted by NC on 01/07/08 02:41
On Jan 6, 10:58 am, Gilles Ganault <nos...@nospam.com> wrote:
>
> One of the ways to raise performance for PHP apps is to separate
> static contents from dynamic contents, so that the former can be
> compiled once into cache.
>
> Can someone give me a simple example of how this kind of thing is
> done when making calls to MySQL?
It's not; you are confusing caching content with caching database
queries.
If you cache content, you put a caching proxy server between your
application and the Internet; the proxy server receives a request from
the Internet and either serves a cached copy of the page being
requested, if it's available, or gets the page from your application,
serves it out and stores a copy in the cache for future use.
If you cache queries, you simply turn on query caching in the MySQL
server; no specific calls from the application are necessary. If you
have queries that are executed often, query caching ensures they are
not executed each time, but rather, their results are retrieved from
cache.
Cheers,
NC
Navigation:
[Reply to this message]
|