When using APC caching on the global configuration, Joomla seems to cache on APC with the cache time in seconds.
The "cache time" field on the configuration states that: "The maximum length of time in minutes for a cache file to be stored before it is refreshed."
One would assume that setting the cache field to "10" would cache on APC for "600" seconds, but according to the APC status page, it saves it for 10 seconds, so it seems that Joomla isn't converting from the inputed field in minutes to seconds before storing it on APC.
Labels |
Added:
?
|
Would you be able to submit a Pull Request to fix this?
Sorry, unfortunately not any time soon. Not only due to limited time but also because I'm not familiar with the Joomla core enough to confidently submit a pull request.
Also, my fix was actually just a quick fix since I'm just using apc so it was easy just going into the file and adding the correct lifetime.
Anyway, from my quick and dirty tests, the issue seems to exist on some other level and not just on JCacheStorageApc. Apparently the JCache class seems to be overriding the lifetime variable on the store method, rendering useless the lifetime property that get's set on JCacheStorage's constructor.
Imho, the cache system (at least jcache and jcachestorageX classes) would need to be reviewed and maybe get some more extensive tests.
Category | ⇒ | Cache |
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-03-27 19:15:03 |
Closed_By | ⇒ | brianteeman |
I've changed the JCacheStorageApc::store method to multiply the expiration value by 60 and it fixed my issue. While comparing the different cache engines I noticed that the redis engine also seems to be hardcoding the cache timeout to 3600s instead of using the _lifetime property.