Disable Template Cache

Hi,

Is there a way to totally disable template caching? We’ve tried setting the cache options to false in the config.inc.php but it continues to generate t_compile files.

Thanks.

Hi @ajrbyers,

Could you describe what you’d like to accomplish? That’s likely possible via configuring the Smarty library, but would really slow down any template use, and template caching is supposed to be transparent.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

Sure. We’ve got quite a few installs of OJS (100+ now) as we set an individual DB for each OJS instance. So I’ve setup a config system that handles incoming URLs and dynamically sets the Database config etc for each so that we only need 1 install of OJS to run multiple instances.

This works quite well, the cast majority of the page is loaded up properly without too much bother however, this chunk:

$this->_tpl_vars['siteTitle'];

Always seems to be cached so if you jump from one journal to another it doesn’t change.

Andy

Hi @ajrbyers,

Is it possible that this is caused by the settings caches (e.g. cache/fc-siteSettings-site.php) rather than the template compile cache?

Regards,
Alec Smecher
Public Knowledge Project Team

Could be, is there a way to disable it? As far as I can see all caching is disabled…

Hi @ajrbyers,

I would probably edit lib/pkp/classes/cache/FileCache.inc.php and neuter some of the code there. I’ve never disabled file caching, so I can’t guarantee there won’t be side-effects, though I can’t think of any off the top of my head.

Regards,
Alec Smecher
Public Knowledge Project Team

Thanks! Will report back!