View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0006768 | OXID eShop (all versions) | 4.08. Cache | public | 2018-01-12 11:25 | 2024-06-12 15:56 |
Reporter | QA | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | acknowledged | Resolution | open | ||
Product Version | 4.10.7 / 5.3.7 | ||||
Summary | 0006768: Memcached causes shop crashes | ||||
Description | We were able to identify a problem in the shop that arises because the memcached cannot cope with it if a cache object ID contains a space. This can occur in OXID, for example, when a CMS page is created whose ident contains a blank space. If you then try to load this CMS page, the request terminates. If you want to link to this CMS page e. g. in the footer, i. e. on all pages, it is no longer possible to call up only one of the shop pages. Our suggested solution would be to return only hashed values at places in the core classes where a cache key is created (e. g. oxContent:: getCacheKey ()) and thus to eliminate all special characters that could lead to a problem in the memcached. It may also make sense to define a global getCacheKey function in the core class oxCacheBackend or oxMemcachedCacheConnector, which can replace the individual getCacheKey functions in the various model classes. We solved the problem with us by removing all blanks for the cache key from the CMS identities in order to have the memcached working again. | ||||
Steps To Reproduce | Enable caching in the Default Cache Backend area and configure Memcached as Connector. Extend a Smarty template as described below Example input in a Smarty template: [{oxifcontent ident="test test2 test3"}][{/oxifcontent}] [{oxifcontent ident="test4"}][{/oxifcontent}] The CMS pages for the idents don't even have to exist. request cancels in the function oxContent::LoadFromCache ($sOXID) when trying to save "test4" in the cache Line 164: $oCache->set ($sKey, $oCacheItem); | ||||
Additional Information | Additional information If the memcached is switched to the binary protocol, it could handle spaces in cache keys. However, we will no longer be able to delete only selected objects from the cache (regular expression on the cache keys). This is currently used by our customer to delete all cache entries except for the sessions from the memcached. | ||||
Tags | Performance and Caching Rework | ||||
Theme | Not defined | ||||
Browser | Not defined | ||||
PHP Version | Not defined | ||||
Database Version | Not defined | ||||