只是一个快速的问题,我似乎找不到一个可靠的答案,Magento Inteprise 1.13现在带Redis for Cache Backend即将开箱即用?

还是我仍然需要使用 https://github.com/colinmollenhour/cm_cache_backend_redis ?

我可以看到我的企业基础安装中有一个mage_cache_backend_redis文件,但是我不确定如何对其进行配置,因为到目前为止尚无REDIS的工作知识。

有帮助吗?

解决方案

Redis 在Magento 1.13中支撑在框架中 - 它也是Colin兼容CE兼容模块的直接端口。

以下是从科林的github改编的 Cm_Cache_Backend_Redis, ,为企业1.13中的班级名称编辑。

这就是您要配置的方式:

<!-- This is a child node of config/global -->
<cache>
  <backend>Mage_Cache_Backend_Redis</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>

<!-- This is a child node of config/global for Magento Enterprise FPC -->
<full_page_cache>
  <backend>Mage_Cache_Backend_Redis</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>1</database> <!-- Separate database 1 to keep FPC separately -->
    <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 -->
    <lifetimelimit>57600</lifetimelimit>    <!-- 16 hours of lifetime for cache record -->
    <compress_data>0</compress_data>        <!-- DISABLE compression for EE FPC since it already uses compression -->
  </backend_options>
</full_page_cache>

REDIS会话存储的一个示例是:

    <!-- example of redis session storage -->
    <session_save>db</session_save>
    <redis_session>                       <!-- All options seen here are the defaults -->
        <host>127.0.0.1</host>            <!-- Specify an absolute path if using a unix socket -->
        <port>6379</port>
        <password></password>             <!-- Specify if your Redis server requires authentication -->
        <timeout>2.5</timeout>            <!-- This is the Redis connection timeout, not the locking timeout -->
        <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 -->
        <db>0</db>                        <!-- Redis database number; protection from accidental loss is improved by using a unique DB number for sessions -->
        <compression_threshold>2048</compression_threshold>  <!-- Set to 0 to disable compression (recommended when suhosin.session.encrypt=on); known bug with strings over 64k: https://github.com/colinmollenhour/Cm_Cache_Backend_Redis/issues/18 -->
        <compression_lib>gzip</compression_lib>              <!-- gzip, lzf or snappy -->
        <log_level>1</log_level>               <!-- 0 (emergency: system is unusable), 4 (warning; additional information, recommended), 5 (notice: normal but significant condition), 6 (info: informational messages), 7 (debug: the most information for development/testing) -->
        <max_concurrency>6</max_concurrency>                 <!-- maximum number of processes that can wait for a lock on one session; for large production clusters, set this to at least 10% of the number of PHP processes -->
        <break_after_frontend>5</break_after_frontend>       <!-- seconds to wait for a session lock in the frontend; not as critical as admin -->
        <break_after_adminhtml>30</break_after_adminhtml>
        <bot_lifetime>7200</bot_lifetime>                    <!-- Bots get shorter session lifetimes. 0 to disable -->
    </redis_session>

资源: https://github.com/colinmollenhour/cm_cache_backend_redis

资源: http://www.magentocommerce.com/knowledge-base/entry/entry/ee113-later-release-notes#ee113-11300高光

许可以下: CC-BY-SA归因
scroll top