magento memcache缓存配置

在app/etc/local.xml

<global>配置段中添加 cache段配置

 

 

[html] view plaincopy
 
  1. <config>  
  2.     <global>  
  3.         <install>  
  4.             <date><![CDATA[Fri, 25 May 2012 08:07:23 +0000]]></date>  
  5.         </install>  
  6.         <crypt>  
  7.             <key><![CDATA[d2bd1ffb7680cb1d9afec20332073f1f]]></key>  
  8.         </crypt>  
  9.         <disable_local_modules>false</disable_local_modules>  
  10.         <resources>  
  11.             <db>  
  12.                 <table_prefix><![CDATA[]]></table_prefix>  
  13.             </db>  
  14.             <default_setup>  
  15.                 <connection>  
  16.                     <host><![CDATA[localhost]]></host>  
  17.                     <username><![CDATA[61pad]]></username>  
  18.                     <password><![CDATA[123456]]></password>  
  19.                     <dbname><![CDATA[magento17]]></dbname>  
  20.                     <initStatements><![CDATA[SET NAMES utf8]]></initStatements>  
  21.                     <model><![CDATA[mysql4]]></model>  
  22.                     <type><![CDATA[pdo_mysql]]></type>  
  23.                     <pdoType><![CDATA[]]></pdoType>  
  24.                     <active>1</active>  
  25.                 </connection>  
  26.             </default_setup>  
  27.         </resources>  
  28.         <session_save><![CDATA[files]]></session_save>  
  29.         <cache><!--缓存配置-->  
  30.             <backend>memcached</backend>  
  31.             <memcached>  
  32.                 <servers>  
  33.                     <server>  
  34.                         <host><![CDATA[localhost]]></host>  
  35.                         <port><![CDATA[11211]]></port>  
  36.                         <persistent><![CDATA[0]]></persistent>  
  37.                     </server>  
  38.                 </servers>  
  39.                 <compression><![CDATA[0]]></compression>  
  40.                 <cache_dir><![CDATA[]]></cache_dir>  
  41.                 <hashed_directory_level><![CDATA[]]></hashed_directory_level>  
  42.                 <hashed_directory_umask><![CDATA[]]></hashed_directory_umask>  
  43.                 <file_name_prefix><![CDATA[]]></file_name_prefix>  
  44.             </memcached>  
  45.         </cache>  
  46.     </global>  
  47.     <admin>  
  48.         <routers>  
  49.             <adminhtml>  
  50.                 <args>  
  51.                     <frontName><![CDATA[admin]]></frontName>  
  52.                 </args>  
  53.             </adminhtml>  
  54.         </routers>  
  55.     </admin>  
  56. </config>  

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。