Create a cache object using JCache::getInstance(), for eg.;
$options = array(
'defaultgroup' => 'custom_group',
'checkTime' => TRUE,
'caching' => 1,
'application' => 'site',
'language' => 'en-GB',
'lifetime' => 60 * 60 * 60
);
$cache = JCache::getInstance($options);
Set cache handler to CacheLite in Global Configurations.
The options passed to the Cache object constructor should overwrite the options in Global Configurations. For instance if caching is off then caching should still work because caching is set to 1 in the options.
Options passed to the Constructor are widely ignored. If caching is turned off in Global Configurations then no caching occurs. If it is turned on then the lifetime in Global Configurations is used.
I can get it to work by setting:
$cache->setCaching(1);
$cache->setLifeTime(60 * 60 * 60);
But then checkTime is ignored and cache is created every time instead of using the existing cache.
If caching is turned on in Global Configurations then everything works as expected.
Windows 7
Joomla 3.6.6
PHP 5.4.34
Chrome
Category | ⇒ | Cache |
Labels |
Added:
?
|
Status | New | ⇒ | Information Required |
Status | Information Required | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-01-18 13:19:56 |
Closed_By | ⇒ | brianteeman |
Closed due to inactivity - it can always be reopened
This is still an issue. I'm currently encountering this issue as well.
Hi
Sorry that no one has replied to this before. Is this still an issue with the current release of Joomla or has it been resolved elsewhere?
This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/5422.