User tests: Successful: Unsuccessful:
Fix issues with XCache cache handler when it is enabled in the Joomla! Global Configuration but not available on the hosting environment.
http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=20476
@Bakual: Yes, hacking the configuration.php file enables to test this quickly. But there might be use-cases where this error occurs more easily: For instance, have a Joomla! site with Xcache enabled move to a new hosting environment with no Xcache available.
Indeed, the issue might be there for other caching handlers (memcached, APC, etcetera).
I've been thinking about this a bit more. If there are no options available as cache handler, there definitely should be a default option available like "None" or "No caching available".
For this a new cache handler "none could be added - which ofcourse would always be available. Simply adding a new option to the select-list might not have the desired result - some Joomla! code might be referring to get() calls or clean() calls which might go to an empty object. The JCacheStorageNone class will just have a bunch of methods that simply return true.
The additional benefit of this could be that the caching engine uses the "none" handler as fallback. But I'm not sure whether that's needed.
This issue is quite common when sites are moved from one server to another. I've had a similar problem when moving from a server with memcached
Thanks for the explanation. Makes sense
@yireo Jisse, there are some codestyle issues:
:14: trailing whitespace.
:22: trailing whitespace.
:40: trailing whitespace.
:53: trailing whitespace.
:68: trailing whitespace.
warning: squelched 16 whitespace errors
warning: 21 lines add whitespace errors.
Can you check them please? Thanks.
I finally found time to properly setup PHP CodeSniffer. Latest commit now includes also the proper style changes. PHP CodeSniffer with Joomla! Standard reports no further issues.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2014-07-20 16:19:31 |
I wish that I am not off topic. What would the best way to get xcache and memcache working both on Joomla?
@ehrereich This is definitely not the place for such a question. GitHub is about code, and these threads are specifically about code patches. Your question is better posted on the Joomla! Forums.
Just wondering: How do you manage to select the cache handler when it's not available? The global configuration shouldn't allow you to do that, or am I wrong? To my knwoledge the only way would be to manually set that setting in the
configuration.php
file.How are we handling this case for the other handlers?