Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache Lite storage handler ignores options passed in constructor #5422

Closed
codealfa opened this issue Dec 13, 2014 · 3 comments
Closed

Cache Lite storage handler ignores options passed in constructor #5422

codealfa opened this issue Dec 13, 2014 · 3 comments

Comments

@codealfa
Copy link

Steps to reproduce the issue

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.

Expected result

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.

Actual result

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.

System information (as much as possible)

Windows 7
Joomla 3.6.6
PHP 5.4.34
Chrome

Additional comments

@brianteeman
Copy link
Contributor

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.

@brianteeman
Copy link
Contributor

Closed due to inactivity - it can always be reopened


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/5422.

@svenbluege
Copy link
Contributor

This is still an issue. I'm currently encountering this issue as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants