Magento - APC Caching, weird basket behaviour

2019-09-06 11:58发布

问题:

Has anyone ever noticed any weird behaviour with regards to the shopping cart in magento when apc caching is enabled?

I have a situation where it looks as though extra items and/or different items are being added when the user adds something.

Its very strange and aparantly random but only seems to occur when we have apc enabled.

回答1:

This answer touches on what might be going on:

Memcached vs APC which one should I choose?

Simply move to memcache and your troubles should be resolved.



回答2:

You may want to try and clear APC's cache, both system cache and user cache.

Note that there is a difference between regular APC cache from CLI and Web based entries, and from what I've gathered you can't simply call it from CLI it has to be from a web request like so:

system('wget --spider --quiet http://localhost/apc/clear_apc_cache.php');

clear_apc_cache.php would contain:

apc_clear_cache('user');

More details: http://php.net/manual/en/function.apc-clear-cache.php

and note the Cache type Parameter:

If cache_type is "user", the user cache will be cleared; otherwise, the system cache (cached files) will be cleared.



标签: magento