Skip to content

Instantly share code, notes, and snippets.

@andkirby
Last active September 6, 2016 19:30
Show Gist options
  • Save andkirby/26fe2949a1d047d4a359183a2c9097a2 to your computer and use it in GitHub Desktop.
Save andkirby/26fe2949a1d047d4a359183a2c9097a2 to your computer and use it in GitHub Desktop.
Magento local.xml example for enabling Redis for cache and Memcached for sessions.
<?xml version="1.0"?>
<config>
<global>
<session_save><![CDATA[memcached]]></session_save>
<session_save_path><![CDATA[127.0.0.1:11211?persistent=0&weight=2&timeout=10&retry_interval=10]]></session_save_path>
<cache>
<backend>Mage_Cache_Backend_Redis</backend>
<backend_options>
<server>127.0.0.1</server>
<port>6379</port>
<persistent></persistent>
<database>1</database>
<password></password>
<force_standalone>0</force_standalone>
<connect_retries>3</connect_retries>
<read_timeout>10</read_timeout>
<automatic_cleaning_factor>0</automatic_cleaning_factor>
<compress_data>1</compress_data>
<compress_tags>1</compress_tags>
<compress_threshold>20480</compress_threshold>
<compression_lib>gzip</compression_lib>
<use_lua>0</use_lua>
</backend_options>
</cache>
<full_page_cache>
<backend>Mage_Cache_Backend_Redis</backend>
<backend_options>
<server>127.0.0.1</server>
<port>6379</port>
<persistent></persistent>
<database>2</database>
<password></password>
<force_standalone>0</force_standalone>
<connect_retries>3</connect_retries>
<lifetimelimit>57600</lifetimelimit>
<compress_data>0</compress_data>
</backend_options>
</full_page_cache>
</global>
</config>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment