We recommend using Redis for caching in Magento 1, instead of the file cache. For most updated Magento installs you need to only add this to your local.xml, very old versions may need to add the Redis module itself.
Add this code below the session save path (or anywhere within the config area). Then clear the Magento cache in var/cache.
<!– This is a child node of config/global –> <cache> <backend>Cm_Cache_Backend_Redis</backend> <backend_options> <server>127.0.0.1</server> <!– or absolute path to unix socket –> <port>6379</port> <persistent></persistent> <!– Specify unique string to enable persistent connections. –> <database>0</database> <!– Redis database number; protection against accidental data loss is improved by not sharing databases –> <password></password> <!– Specify if your Redis server requires authentication –> <force_standalone>0</force_standalone> <!– 0 for phpredis, 1 for standalone PHP –> <connect_retries>1</connect_retries> <!– Reduces errors due to random connection failures; a value of 1 will not retry after the first failure –> <read_timeout>10</read_timeout> <!– Set read timeout duration; phpredis does not currently support setting read timeouts –> <automatic_cleaning_factor>0</automatic_cleaning_factor> <!– Disabled by default –> <compress_data>1</compress_data> <!– 0-9 for compression level, recommended: 0 or 1 –> <compress_tags>1</compress_tags> <!– 0-9 for compression level, recommended: 0 or 1 –> <compress_threshold>20480</compress_threshold> <!– Strings below this size will not be compressed –> <compression_lib>gzip</compression_lib> <!– Supports gzip, lzf, lz4 (as l4z) and snappy –> <use_lua>0</use_lua> <!– Set to 1 if Lua scripts should be used for some operations –> </backend_options> </cache>
He is the CEO and founder at MageHost. Sahil loves to solve problems and makes sure his clients have a speedy website. When not working hard on his Mac, he is seen traveling!
0 Comments