Hi all,
I'd like to have a discussion about caching and the things you exactly want
to cache. The production servers running my application complain sometimes
about memory (my local server not btw). I think one cause might be the
method of caching.

At this moment I cache most models from the database, with the Core as
frontend. So the instance of blog article with id 1 is cached with id
blog-article-1, a blog category with blog-category-4 and an album from a
gallery with id gallery-album-2345. But a blog article (id=1) has a
dependency on a category, already instantiated and propbably cached as well.

What is the right spot to use cache? At the most final stage, so the page
output? At the beginning when loading the data, e.g. the database queries?
Or use multiple cache methods at a variety of layers? I'd like to get more
insight in what to cache and what not, especially to minimize the memory
usage :)

Regards, Jurian

PS. The idea of this message came after reading this blog post
http://www.davegardner.me.uk/blog/2010/03/22/caching-dependency-injected-objects-with-php/

Reply via email to