Forum for discussing general topics related to Couch.
4 posts Page 1 of 1
Hello,
I have a site that uses caching.
Sometimes, however, this site has a promotions using PHP and it does not work because it has turned caching.
My question is - can the client you on and off caching admin panel - eg checkbox?
Thanks in advance :)

Hi,

You can use the <cms:no_cache /> tag to prevent a particular template (or a view of of it) from getting cached.
Apart from that, I am sorry, we don't have any other method of selectively enabling/disabling caching for now.

Thanks for the reply. I have not explained well. Let us do it now - the question was to exclude caching in certain periods of time and this makes the customer admin panel.

@orbital,

Caching has to be turned on/off from the config file itself (and not through the admin-panel) because while returning a cached file, full Couch is not loaded - only the config file is loaded, if caching is enabled and a cached file can be returned that is done and the execution ends.

For making the setting configurable through admin-panel, we'll then need to load the full Couch codebase which will defeat the purpose of caching.

This problem has been discussed before and one alternative was to make the 'checkbox' in admin-panel you mentioned actually make changes to the physical config.php file. This would work but would need the file to be writable - an idea I am not comfortable with.
4 posts Page 1 of 1