Problems, need help? Have a tip or advice? Post it here.
3 posts Page 1 of 1
Does the page cache also cache included files? PHP? HTML?

My client has announced they want some content added to ALL pages of their rather large site. Adding an include is the only reasonable way I can think of to do this but the content of the include will not change often.

Does Couch cache the included content so the include isn't again retrieved when a cached file is accessed?

Is this specific only to HTML includes? Or?

TY!
Hi,

Suppose there is a page that employs several 'includes' or 'snippets'.
When someone visits this page, and this page is not present in the cache, Couch generates the page and the processes all the includes and snippets in doing so. The generated page's output is handed over to the browser and is also cached.

So, what gets cached is the eventual output that already contains the output of the includes/snippets.
The next time the same page is visited, since it is present in the cache, Couch returns it *without* having to process any PHP/includes/snippets.

I suppose that should answer your query -
Does Couch cache the included content so the include isn't again retrieved when a cached file is accessed?

Yes, the included content is part of the cached page and so it is not retrieved again.
Nice one :) ty!
3 posts Page 1 of 1