View Issue Details

IDProjectCategoryView StatusLast Update
0006768OXID eShop (all versions)4.08. Cachepublic2018-01-12 12:04
ReporterQA Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status acknowledgedResolutionopen 
Product Version4.10.7 / 5.3.7 
Summary0006768: Memcached causes shop crashes
DescriptionWe 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 ReproduceEnable 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 InformationAdditional 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.
TagsNo tags attached.
ThemeNot defined
BrowserNot defined
PHP VersionNot defined
Database VersionNot defined

Activities

There are no notes attached to this issue.