? Success

User tests: Successful: Unsuccessful:

avatar yireo
yireo
11 Jul 2014

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

avatar yireo yireo - open - 11 Jul 2014
avatar Bakual
Bakual - comment - 11 Jul 2014

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?

avatar yireo
yireo - comment - 11 Jul 2014

@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.

avatar brianteeman
brianteeman - comment - 11 Jul 2014

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

avatar brianteeman
brianteeman - comment - 11 Jul 2014

Should we close #2330 in favour of this?

avatar yireo
yireo - comment - 11 Jul 2014

LOL. PR #2330 is almost identical to my patch - so it almost seem seems as if my earlier patch-file was used here. Almost, because PR #2330 fixes only 3 methods, while PR #3878 (this one) fixes 5 methods (which is all methods). I would favour this one.

avatar Bakual
Bakual - comment - 11 Jul 2014

Thanks for the explanation. Makes sense :+1:

avatar brianteeman
brianteeman - comment - 11 Jul 2014

OK will close #2330 in favour of this

avatar roland-d
roland-d - comment - 14 Jul 2014

@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.

avatar yireo
yireo - comment - 15 Jul 2014

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.

avatar infograf768 infograf768 - close - 20 Jul 2014
avatar infograf768 infograf768 - reference | - 20 Jul 14
avatar infograf768 infograf768 - merge - 20 Jul 2014
avatar infograf768 infograf768 - close - 20 Jul 2014
avatar infograf768 infograf768 - change - 20 Jul 2014
Status New Closed
Closed_Date 0000-00-00 00:00:00 2014-07-20 16:19:31
avatar ehrereich
ehrereich - comment - 25 Jul 2014

I wish that I am not off topic. What would the best way to get xcache and memcache working both on Joomla?

avatar yireo
yireo - comment - 26 Jul 2014

@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.

Add a Comment

Login with GitHub to post a comment