Note that there are some explanatory texts on larger screens.

plurals
  1. POMagento Memcached Sessions
    primarykey
    data
    text
    <p>I am currently trying to set up a production environment for Magento with the following setup:</p> <p>2x Web Server, 1x DB server, Load Balancer.</p> <p>So the load balancer will be distributing the traffic between web servers but will not be using sticky sessions.</p> <p>To tackle the problem of sharing sessions between servers I have chosen to use Memcached. I have a Memcached server running on each webserver and have then specified the list of memcached servers in the local.xml on each web server.</p> <p>The cache is working since I definitely notice an increase in speed, plus I can see the sessions are being shared across web servers. The problem lies in the fact that the cache is working a little too well. The dynamic portions of the page (such as the cart and messages) are being cached entirely for each page.</p> <p>I've noticed that the getChildHtml() that you call to put the cart on the page has an optional parameter called useCache which I am explicitly passing in false but this does nothing. Here is my local.xml definition just in case I've done something wrong in there (sensitive information has been left out):</p> <pre><code>&lt;config&gt; &lt;global&gt; &lt;install&gt; &lt;date&gt;&lt;/date&gt; &lt;/install&gt; &lt;crypt&gt; &lt;key&gt;&lt;/key&gt; &lt;/crypt&gt; &lt;disable_local_modules&gt;false&lt;/disable_local_modules&gt; &lt;resources&gt; &lt;db&gt; &lt;table_prefix&gt;&lt;/table_prefix&gt; &lt;/db&gt; &lt;default_setup&gt; &lt;connection&gt; &lt;/connection&gt; &lt;/default_setup&gt; &lt;/resources&gt; &lt;session_save&gt;&lt;![CDATA[memcache]]&gt;&lt;/session_save&gt; &lt;!-- db / memcache / empty=files --&gt; &lt;session_save_path&gt;&lt;![CDATA[tcp://X.X.X.X:11211?persistent=1&amp;weight=2&amp;timeout=10&amp;retry_interval=10]]&gt;&lt;/session_save_path&gt;&lt;!-- e.g. for memcache session save handler tcp://10.0.0.1:11211?persistent=1&amp;weight=2&amp;timeout=10&amp;retry_interval=10 --&gt; &lt;session_cache_limiter&gt;&lt;![CDATA[private]]&gt;&lt;/session_cache_limiter&gt;&lt;!-- see http://php.net/manual/en/function.session-cache-limiter.php#82174 for possible values --&gt; &lt;cache&gt; &lt;backend&gt;memcached&lt;/backend&gt;&lt;!-- apc / memcached / xcache / empty=file --&gt; &lt;slow_backend&gt;database&lt;/slow_backend&gt; &lt;!-- database / file (default) - used for 2 levels cache setup, necessary for all shared memory storages --&gt; &lt;slow_backend_store_data&gt;&lt;/slow_backend_store_data&gt; &lt;!-- 1 / 0 (default) - used for 2 levels cache setup, sets whether store data in db slow cache backend --&gt; &lt;auto_refresh_fast_cache&gt;1&lt;/auto_refresh_fast_cache&gt; &lt;!-- 1 / 0 (default) - used for 2 levels cache setup, sets whether refresh data in fast cache backend --&gt; &lt;memcached&gt;&lt;!-- memcached cache backend related config --&gt; &lt;servers&gt;&lt;!-- any number of server nodes can be included --&gt; &lt;server&gt; &lt;host&gt;&lt;![CDATA[X.X.X.X]]&gt;&lt;/host&gt; &lt;port&gt;&lt;![CDATA[11211]]&gt;&lt;/port&gt; &lt;persistent&gt;&lt;![CDATA[1]]&gt;&lt;/persistent&gt; &lt;/server&gt; &lt;server&gt; &lt;host&gt;&lt;![CDATA[X.X.X.X]]&gt;&lt;/host&gt; &lt;port&gt;&lt;![CDATA[11211]]&gt;&lt;/port&gt; &lt;persistent&gt;&lt;![CDATA[1]]&gt;&lt;/persistent&gt; &lt;/server&gt; &lt;/servers&gt; &lt;/memcached&gt; &lt;/cache&gt; &lt;/global&gt; &lt;admin&gt; &lt;routers&gt; &lt;adminhtml&gt; &lt;args&gt; &lt;frontName&gt;&lt;![CDATA[admin]]&gt;&lt;/frontName&gt; &lt;/args&gt; &lt;/adminhtml&gt; &lt;/routers&gt; &lt;/admin&gt; </code></pre> <p></p> <p>I've also noticed other strange behaviour like to being able to clear the cache in the cache mangement screen on the admin panel. Is this normal when using memcached in Magento and how can I tackle the problem of the entire page being cached?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload