Hi Friends,
Like any of us, I’m always trying to make sites efficient and fast. And there are caching options in ModX for that purpose, and they seem to work very well.
Here’s one for you... let’s say you have a page that’s based on a database query, and the results of that query vary. In this situation, my thought is that you don’t want to cache the page because you’d end up seeing repetition of results that came from the last query.
So you simply turn off caching for that page. But then I was thinking... when you call a snippet, you can call it cached or uncached. So I’m thinking that you could let the page be cached, but don’t cache the snippet you’re calling. My theory, possibly bogus, is that maybe this would speed things up slightly.
So here’s the question... what do you experts think would be better, faster, whatever?
- Not caching the page at all.
- Caching the page, but not caching the snippet that calls the database.
- Some other option?
On a related topic, when I make a change to a main site template, anecdotally it seemed to me that the site slowed down, possibly while updating the cache(?), and when I cleared the cache and began moving around the site, presumably to refill the cache, it seemed to help. Comments?
Thanks!