Thread:Project:Support desk/Disable caching in certain pages

Hi folks,

I would like to ask is it possible to enable caching for certain pages/extensions.

Let's say I have a counter and by clicking the "increase" button, by right, it will display "1" count. But upon refreshing the page, the counter is 0.

I've realised that this is due to a caching issue and by putting these 2 in my localsettings, it works fine when i refreshed the page $wgEnableParserCache = false; $wgCachePages = false;

Disable caching will affect perform hence I would like to ask if it is possible to only disable cache for that counter extension and the rest will still have caching.

Will putting the above 2 codes in my counter extension work?

Or will the following work? if (require_once("$IP/extensions/counter.php")) {  $wgEnableParserCache = false; $wgCachePages = false; }

Thanks all for assistance and time!