I have a Redis server already created on Microsoft Azure, and I'm trying to configure the Windows-based Azure Web App with the Redis server; I'm not sure how to install or access one of the 2 extensions I've come across.
As I've read, Redis was available as a pre-installed extension in CE 1.8 as Mage_Cache_Backend_Redis, however apparently that is not installed in CE v1.9?
I'm using CE 1.9.2.2; when I change the local.xml file in my Web App to <backend>Mage_Cache_Backend_Redis</backend> I receive an error:
looking at the log in var/report/1486484366 shows:
I've created a REDIS_HOST, REDIS_KEY, and MEMCACHESHIM_REDIS_ENABLE in the App Settings for my Web App as identified under article https://azure.microsoft.com/en-us/documentation/articles/web-sites-connect-to-redis-using-memcache-p... though I understand this article may not be completely relevant but it's the closest I've seen to help with my issue.
Any help would be appreciated.
You can update your local.xml with the following for your backend cache
<config> <global> <!-- other configuration nodes --> <cache> <backend>CACHE_BACKEND_CLASS_NAME</backend> <backend_options> <server>127.0.0.1</server> <!-- or absolute path to unix socket --> <port>6379</port> <persistent></persistent> <!-- Specify a unique string like "cache-db0" to enable persistent connections. --> <database>0</database> <password></password> <force_standalone>0</force_standalone> <!-- 0 for phpredis, 1 for standalone PHP --> <connect_retries>1</connect_retries> <!-- Reduces errors due to random connection failures --> <read_timeout>10</read_timeout> <!-- Set read timeout duration --> <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 and snappy --> </backend_options> </cache> <!-- other configuration nodes --> </global> </config>
Brent: Thanks for the help; I've tried that and my current local.xml is below. I've tried with:
<backend>Mage_Cache_Backend_Redis</backend>
and the local IP <server>127.0.0.1</server>
I just don't see that my Azure site is talking to the Azure Redis server, located at mywebsite.redis.cache.windows.net. The closest documentation I've found is how to connect a site running Memcache at https://azure.microsoft.com/en-us/documentation/articles/web-sites-connect-to-redis-using-memcache-p.../.
local.xml:
<cache>
<backend>Cm_RedisSession</backend>
<backend_options>
<server>hostnameremoved.redis.cache.windows.net</server> <!-- or absolute path to unix socket -->
<port>6379</port>
<persistent></persistent> <!-- Specify unique string to enable persistent connections. E.g.: sess-db0; bugs with phpredis and php-fpm are known: https://github.com/nicolasff/phpredis/issues/70 -->
<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> <!-- Support gzip, lzf, lz4 (https://github.com/kjdev/php-ext-lz4) or snappy (https://github.com/goatherd/php-snappy) -->
<use_lua>0</use_lua> <!-- Set to 1 if Lua scripts should be used for some operations -->
</backend_options>
</cache>