五 缓存
缓存简介
Magento 2使用zend_cache与缓存存储交互。然而,Magento 2也有Magento\Cache库实现的具体缓存Magento。这些主题讨论如何配置缓存和缓存类型。
默认情况下,文件系统缓存启用;位于 <Magento 2 安装目录>/var.
更改缓存配置,编辑<Magento 2 安装目录>/app/etc/env.php.
缓存配置是与下列类似的关联数组:
'cache_types' => array ( 'config' => 1, 'layout' => 1, 'block_html' => 1, 'collections' => 1, 'db_ddl' => 1, 'eav' => 1, 'full_page' => 1, 'translate' => 1, 'config_integration' => 1, 'config_webservice' => 1, 'config_integration_api' => 1, ), );
@缓存类型
1, 副缓存前端缓存类型
Magento 2允许您配置文件系统缓存替代默认缓存。本指南讨论了一些替代方案,即,
.Database
.Redis
.设置 Varnish 无需修改Magento的配置。
Magento 2使用以下缓存术语:
Frontend: Magento\Framework\Cache\Frontend.
Cache types: 可以设置一个类型Magento 2也可以创建你自己的.
Backend: 指定详细信息 cache storage, 实施 Magento\Framework\Cache\Backend
以下配置缓存选项 :
修改默认前端缓存,只需要修改 <Magento 2 安装目录>/app/etc/di.xml
配置您的自定义前端缓存,只需修改 <Magento 2 安装目录>/app/etc/env.php 因为它覆盖了等效配置 di.xml
Varnish 不需要更改Magento 2的配置.
2, 低级别缓存
前端低级别缓存
Magento 2 继承 Zend_Cache_Core 通过 Magento\Framework\Cache\Core 来实现前端低级别缓存.
后端低级别缓存
Redis
Database
Varnish不需要设置低级缓存
3, 数据库缓存
数据库缓存概述
本主题讨论如何使用Magento 2数据库缓存. cache
和 cache_tag
,缓存的对象存储在Magento 2数据库表。不存储 var/cache
或 var/page_cache
.
使用默认的前端缓存, 只需要修改
di.xml
使用一个自定义的前端缓存, 只需要修改
env.php
数据库缓存 使用 default
前端缓存
为了使数据库前端缓存使用默认,你必须修改 <Magento 2 安装目录>/app/etc/di.xml
。
修改 di.xml
:
登录到magento2服务器,切换到 Magento 2文件系统所有者.
输入下列命令以复制
di.xml
:cd <Magento 2 安装目录>/app/etc cp di.xml di.xml.bak
打开
di.xml
在文本编辑器中找到下面的块:<type name="Magento\Framework\App\Cache\Frontend\Pool"> <arguments> <argument name="frontendSettings" xsi:type="array"> <item name="page_cache" xsi:type="array"> <item name="backend_options" xsi:type="array"> <item name="cache_dir" xsi:type="string">page_cache</item> </item> </item> </argument> </arguments> </type> <type name="Magento\Framework\App\Cache\Type\FrontendPool"> <arguments> <argument name="typeFrontendMap" xsi:type="array"> <item name="full_page" xsi:type="string">page_cache</item> </argument> </arguments> </type>
用以下替换整个块:
<type name="Magento\Framework\App\Cache\Frontend\Pool"> <arguments> <argument name="frontendSettings" xsi:type="array"> <item name="page_cache" xsi:type="array"> <item name="backend" xsi:type="string">database</item> </item> <item name="<your cache id>" xsi:type="array"> <item name="backend" xsi:type="string">database</item> </item> </argument> </arguments> </type> <type name="Magento\Framework\App\Cache\Type\FrontendPool"> <arguments> <argument name="typeFrontendMap" xsi:type="array"> <item name="backend" xsi:type="string">database</item> </argument> </arguments> </type>
保存您的更改并退出文本编辑器di.xml。
继续验证数据库的缓存工作.
数据库缓存使用自定义前端缓存
为了使数据库缓存使用自定义缓存前端,你必须修改 <Magento 2 安装目录>/app/etc/env.php
:
登录到magento 2服务器,转换到 Magento 2文件系统所有者.
输入下列命令以复制
env.php
:cd <Magento 2 安装目录>/app/etc cp env.php env.php.bak
打开
env.php
在文本编辑器中任何地方添加如下'cache_types' =>
:'cache' => [ 'frontend' => [ '<unique frontend id>' => [ <cache options> ], ], 'type' => [ <cache type 1> => [ 'frontend' => '<unique frontend id>' ], ], 'type' => [ <cache type 2> => [ 'frontend' => '<unique frontend id>' ], ], ],
保存
env.php
的更改,并关闭编辑器.继续下一节 .
验证数据库的缓存工作
验证数据库缓存工作,明确当前的缓存目录,在Web浏览器的任何可缓存的页面,并验证数据写入数据库而不是文件系统。
使用步骤:
登录magento 2服务器,切换到Magento 2文件系统所有者.
清除当前缓存目录 :
rm -rf <Magento 2 安装目录>/var/cache/* <Magento 2 安装目录>/var/page_cache/* <Magento 2 安装目录>/var/di/* <Magento 2 安装目录>/var/generation/*
在Web浏览器中,去任何可缓存的页面.如果显示异常, 验证
di.xml
语法,然后再试一次. (要在浏览器查看到异常显示,你必须 使用开发者模式.)输入下面的命令:
ls <Magento 2 安装目录>/var/cache/* ls <Magento 2 安装目录>/var/page_cache/*
请验证两个目录是否为空;如果没有,请再次编辑
di.xml
纠正任何问题。使用一个数据库工具,例如 phpMyAdmin 查看
cache
和cache_tag
表.
显示结果都有数据
配置实例
本节包含配置数据库缓存示例代码片段。
前端默认缓存di.xml
示例
di.xml
代码片段:
<type name="Magento\Framework\App\Cache\Frontend\Pool"> <arguments> <argument name="frontendSettings" xsi:type="array"> <item name="page_cache" xsi:type="array"> <item name="backend" xsi:type="string">database</item> </item> <item name="default" xsi:type="array"> <item name="backend" xsi:type="string">database</item> </item> </argument> </arguments> </type> <type name="Magento\Framework\App\Cache\Type\FrontendPool"> <arguments> <argument name="typeFrontendMap" xsi:type="array"> <item name="backend" xsi:type="string">database</item> </argument> </arguments> </type>
一个自定义的前端缓存env.php
示例
env.php
代码片段,所有的缓存类型与自定义前端缓存命名 magento_cache
:
'cache' => [ 'frontend' => [ 'magento_cache' => [ 'backend' => 'database' ], ], 'type' => [ 'config' => [ 'frontend' => 'magento_cache' ], 'layout' => [ 'frontend' => 'magento_cache' ], 'block_html' => [ 'frontend' => 'magento_cache' ], 'view_files_fallback' => [ 'frontend' => 'magento_cache' ], 'view_files_preprocessing' => [ 'frontend' => 'magento_cache' ], 'collections' => [ 'frontend' => 'magento_cache' ], 'db_ddl' => [ 'frontend' => 'magento_cache' ], 'eav' => [ 'frontend' => 'magento_cache' ], 'full_page' => [ 'frontend' => 'magento_cache' ], 'translate' => [ 'frontend' => 'magento_cache' ], 'config_integration' => [ 'frontend' => 'magento_cache' ], 'config_integration_api' => [ 'frontend' => 'magento_cache' ], 'config_webservice' => [ 'frontend' => 'magento_cache' ], ], ],
@Magento2页面缓存
1, 页面缓存概述
缓存是提高各种Web应用程序性能的 有效方法。一般来说,缓存有两种方式:客户端(浏览器)和服务器端。此外,有两种类型的内容:公共(可供多个客户)和私人(具体到一个客户)。
Magento2页面缓存是full-page cache; 也就是缓存整个页面
默认缓存机制存储缓存文件有以下方式:
在文件系统上.你不需要做任何事情,使用基于文件的缓存.
Database
Redis
Varnish (推荐)
可缓存和不可缓存的页面
Cacheable(可缓存) 和 uncacheable(不可缓存) 我们使用的术语是指一个页面是否应该全部缓存。(默认情况下,所有的页面都缓存。)
创建一个不可缓存的页面,页面中的块使用 cacheable=”false”标记.
例如 购物车页面,结算页面等等是不可缓存的页面.
Public(公共的)和 私人(private)的内容
Private 页面上的内容仅用于一个用户 ; 例如用户登录的用户名. 在高速缓存页中呈现私有内容有时被称为hole punching ,我们将在下一个主题中更详细地讨论它。
2, Public(公共的和私人(private)的缓存内容
Magento 2的页面缓存存储整个缓存页面;页面存储取决于内容是否是私人或公共的。这些术语定义如下:
Public, 可以向许多客户展示.
公开的内容存储在缓存存储(文件系统,数据库,或Redis),或Varnish。公共内容包括页眉、页脚和类别列表。
Private, 这是不存储在Magento服务器缓存;相反,它是存储在客户端。
私人内容包括收藏、购物车、客户名称、地址。私有内容应限制在页面总内容的一小部分。
3, HTTP context(上下文)
缓存服务器和代理服务器通常使用URL作为缓存标识符;然而,Magento 2的URL是不足区分缓存。(我们可以缓存客户组,选定的语言,客户是否登录,等等)。
为让每个缓存的URL完全独特的,我们用 HTTP上下文变量使Magento2内容基于不同客户群,同一个URL选择的语言,无论用户登录与否,等等。
上下文变量不能针对一个用户,因为变量用于公共内容的缓存密钥中。换句话说,每个用户的上下文变量会导致每个用户在服务器上缓存的内容的单独副本。
Magento2将字符串中的上下文变量,从字符串生成缓存,并设置它的值 X-Magento-Vary cookie. HTTP代理可以配置为基于cookie和URL计算缓存的唯一标识符。例如,Varnish 4 配置 :
sub vcl_hash {
if (req.http.cookie ~ “X-Magento-Vary=”) {
hash_data(regsub(req.http.cookie, “^.?X-Magento-Vary=([^;]+);.*$”, “\1”));
}
… more …
}
有关上下文类的示例,请参见 Magento/Framework/App/Http/Context.
@缓存失效和私有内容版本
缓存失效
Magento 2实体变化后可以清空缓存,立即查看效果。我们使用 IdentityInterface 将应用程序中的实体与缓存的内容连接起来,并知道当实体改变时要清除哪些缓存。
本节讨论当你改变一个实体时如何告知Magento 2应用清除缓存。
首先,你的实体模块必须实现 Magento/Framework/DataObject/IdentityInterface 如下:
use Magento\Framework\DataObject\IdentityInterface; class Product implements IdentityInterface { /** * Product cache tag */ const CACHE_TAG = 'catalog_product'; /** * Get identities * * @return array */ public function getIdentities() { return [self::CACHE_TAG . '_' . $this->getId()]; } }
其次,块对象也必须实现 Magento/Framework/DataObject/IdentityInterface
如下:
class View extends AbstractProduct implements \Magento\Framework\DataObject\IdentityInterface { /** * Return identifiers for produced content * * @return array */ public function getIdentities() { return $this->getProduct()->getIdentities(); } }
私人内容版本
私有内容存储在浏览器本地存储中,使用private_content_version cookie存储版本.
六 配置REDIS
@Magento 2 页面缓存和默认缓存中使用Redis
先决条件
先安装Redis.
Magento 2 页面缓存和默认缓存中使用Redis配置
Magento 2 页面缓存和默认缓存中使用Redis示例. magento 2 缓存 实现类 Magento\Framework\App\CacheInterface
.
添加类似于下面的配置到 <Magento 2 安装目录>app/etc/env.php
:
'cache' => array( 'frontend' => array( 'default' => array( 'backend' => 'Cm_Cache_Backend_Redis', 'backend_options' => array( 'server' => '127.0.0.1', 'database' => '0', 'port' => '6379' ), ), 'page_cache' => array( 'backend' => 'Cm_Cache_Backend_Redis', 'backend_options' => array( 'server' => '127.0.0.1', 'port' => '6379', 'database' => '1', 'compress_data' => '0' ) ) ) ),
基本验证
为了验证redis和Magento是一起工作的,使用下面的命令:
Redis监控命令
在服务器上使用运行命令提示符,输入 :
redis-cli monitor
刷新您的店面页面,你会看到类似的输出如下.
Session 存储
如果你使用redis的Session存储,你会看到类似如下的输出 :
1476824834.187250 [0 127.0.0.1:52353] "select" "0" 1476824834.187587 [0 127.0.0.1:52353] "hmget" "sess_sgmeh2k3t7obl2tsot3h2ss0p1" "data" "writes" 1476824834.187939 [0 127.0.0.1:52353] "expire" "sess_sgmeh2k3t7obl2tsot3h2ss0p1" "1200" 1476824834.257226 [0 127.0.0.1:52353] "select" "0" 1476824834.257239 [0 127.0.0.1:52353] "hmset" "sess_sgmeh2k3t7obl2tsot3h2ss0p1" "data" "_session_validator_data|a:4:{s:11:\"remote_addr\";s:12:\"10.235.34.14\";s:8:\"http_via\";s:0:\"\";s:20:\"http_x_forwarded_for\";s:0:\"\";s:15:\"http_user_agent\";s:115:\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36\";}_session_hosts|a:1:{s:12:\"10.235.32.10\";b:1;}admin|a:0:{}default|a:2:{s:9:\"_form_key\";s:16:\"e331ugBN7vRjGMgk\";s:12:\"visitor_data\";a:3:{s:13:\"last_visit_at\";s:19:\"2016-10-18 21:06:37\";s:10:\"session_id\";s:26:\"sgmeh2k3t7obl2tsot3h2ss0p1\";s:10:\"visitor_id\";s:1:\"9\";}}adminhtml|a:0:{}customer_base|a:1:{s:20:\"customer_segment_ids\";a:1:{i:1;a:0:{}}}checkout|a:0:{}" "lock" "0" ... more ...
页面缓存
如果你使用redis缓存页面,你会看到类似如下的输出:
1476826133.810090 [0 127.0.0.1:52366] "select" "1" 1476826133.816293 [0 127.0.0.1:52367] "select" "0" 1476826133.817461 [0 127.0.0.1:52367] "hget" "zc:k:ea6_GLOBAL__DICONFIG" "d" 1476826133.829666 [0 127.0.0.1:52367] "hget" "zc:k:ea6_DICONFIG049005964B465901F774DB9751971818" "d" 1476826133.837854 [0 127.0.0.1:52367] "hget" "zc:k:ea6_INTERCEPTION" "d" 1476826133.868374 [0 127.0.0.1:52368] "select" "1" 1476826133.869011 [0 127.0.0.1:52369] "select" "0" 1476826133.869601 [0 127.0.0.1:52369] "hget" "zc:k:ea6_DEFAULT_CONFIG_CACHE_DEFAULT__10__235__32__1080MAGENTO2" "d" 1476826133.872317 [0 127.0.0.1:52369] "hget" "zc:k:ea6_INITIAL_CONFIG" "d" 1476826133.879267 [0 127.0.0.1:52369] "hget" "zc:k:ea6_GLOBAL_PRIMARY_PLUGIN_LIST" "d" 1476826133.883312 [0 127.0.0.1:52369] "hget" "zc:k:ea6_GLOBAL__EVENT_CONFIG_CACHE" "d" 1476826133.898431 [0 127.0.0.1:52369] "hget" "zc:k:ea6_DB_PDO_MYSQL_DDL_STAGING_UPDATE_1" "d" 1476826133.898794 [0 127.0.0.1:52369] "hget" "zc:k:ea6_RESOLVED_STORES_D1BEFA03C79CA0B84ECC488DEA96BC68" "d" 1476826133.905738 [0 127.0.0.1:52369] "hget" "zc:k:ea6_DEFAULT_CONFIG_CACHE_STORE_DEFAULT_10__235__32__1080MAGENTO2" "d" ... more ... 1476826210.634998 [0 127.0.0.1:52439] "hmset" "zc:k:ea6_MVIEW_CONFIG" "d" "a:18:{s:19:\"design_config_dummy\";a:4:{s:7:\"view_id\";s:19:\"design_config_dummy\";s:12:\"action_class\";s:39:\"Magento\\Theme\\Model\\Indexer\\Mview\\Dummy\";s:5:\"group\";s:7:\"indexer\";s:13:\"subscriptions\";a:0:{}}s:14:\"customer_dummy\";a:4:{s:7:\"view_id\";s:14:\"customer_dummy\";s:12:\"action_class\";s:42:\"Magento\\Customer\\Model\\Indexer\\Mview\\Dummy\";s:5:\"group\";s:7:\"indexer\";s:13:\"subscriptions\";a:0:{}}s:13:\"cms_page_grid\";a:4:{s:7:\"view_id\";s:13:\"cms_page_grid\";s:12:\"action_class\";s:43:\"Magento\\Catalog\\Model\\Indexer\\Category\\Flat\";s:5:\"group\";s:7:\"indexer\";s:13:\"subscriptions\";a:1:{s:8:\"cms_page\";a:3:{s:4:\"name\";s:8:\"cms_page\";s:6:\"column\";s:7:\"page_id\";s:18:\"subscription_model\";N;}}}s:21:\"catalog_category_flat\";a:4:{s:7:\"view_id\";s:21:\"catalog_category_flat\";s:12:\"action_class\";s:43:\"Magento\\Catalog\\Model\\Indexer\\Category\\Flat\";s:5:\"group\";s:7:\"indexer\";s:13:\"subscriptions\";a:6:{s:23:\"catalog_category_entity\";a:3:{s:4:\"name\";s:23:\"catalog_category_entity\";s:6:\"column\";s:9:\"entity_id\";s:18:\"subscription_model\";N;}s:31:\"catalog_category_entity_decimal\";a:3:{s:4:\"name\";s:31:\"catalog_category_entity_decimal\";s:6:\"column\";s:9:\"entity_id\";s:18:\"subscription_model\";s:71:\"Magento\\CatalogStaging\\Model\\Mview\\View\\Category\\Attribute\\Subscription\";}s:27:\"catalog_category_entity_int\";a:3:{s:4:\"name\";s:27:\"catalog_category_entity_int\";s:6:\"column\";s:9:\"entity_id\";s:18:\"subscription_model\";s:71:\"Magento\\CatalogStaging\\Model\\Mview\\View\\Category\\Attribute\\Subscription\";}s:28:\"catalog_category_entity_text\";a:3:{s:4:\"name\";s:28:\"catalog_category_entity_text\";s:6:\"column\";s:9:\"entity_id\";s:18:\"subscription_model\";s:71:\"Magento\\CatalogStaging\\Model\\Mview\\View\\Category\\Attribute\\Subscription\";}s:31:\"catalog_category_entity_varchar\";a:3:{s:4:\"name\";s:31:\"catalog_category_entity_varchar\";s:6:\"column\";s:9:\"entity_id\";s:18:\"subscription_model\";s:71:\"Magento\\CatalogStaging\\Model\\Mview\\View\\Category\\Attribute\\Subscription\";}s:32:\"catalog_category_entity_datetime\";a:3:{s:4:\"name\";s:32:\"catalog_category_entity_datetime\";s:6:\"column\";s:9:\"entity_id\";s:18:\"subscription_model\";s:71:\"Magento\\CatalogStaging\\Model\\Mview\\View\\Category\\Attribute\\Subscription\";}}}s:24:\"catalog_category_product\";a:4:{s:7:\"view_id\";s:24:\"catalog_category_product\";s:12:\"action_class\";s:46:\"Magento\\Catalog\\Model\\Indexer\\Category\\Product\";s:5:\"group\";s:7:\"indexer\";s:13:\"subscriptions\";a:2:{s:23:\"catalog_category_entity\";a:3:{s:4:\"name\";s:23:\"catalog_category_entity\";s:6:\"column\" ... more ...
Redis ping 命令
输入下面的命令:
redis-cli ping
@Session 存储中使用Redis
先安装 Redis.你可以使用redis的会话存储Magento 低版本2.0.6。
Magento2 Session 存储使用 Redis 配置
以下添加到 <Magento 2 安装目录>app/etc/env.php
:
'session' => array ( 'save' => 'redis', 'redis' => array ( 'host' => '127.0.0.1', 'port' => '6379', 'password' => '', 'timeout' => '2.5', 'persistent_identifier' => '', 'database' => '2', 'compression_threshold' => '2048', 'compression_library' => 'gzip', 'log_level' => '1', 'max_concurrency' => '6', 'break_after_frontend' => '5', 'break_after_adminhtml' => '30', 'first_lifetime' => '600', 'bot_first_lifetime' => '60', 'bot_lifetime' => '7200', 'disable_locking' => '0', 'min_lifetime' => '60', 'max_lifetime' => '2592000' ) ),
基本验证
为了验证redis和Magento是一起工作的,使用下面的命令:
Redis 监控命令
在服务器上使用运行命令提示符,输入:
redis-cli monitor
刷新您的店面页面,你会看到类似的输出如下.
Session 存储
如果你使用redis的会话存储,你会看到类似如下的输出:
1476824834.187250 [0 127.0.0.1:52353] "select" "0" 1476824834.187587 [0 127.0.0.1:52353] "hmget" "sess_sgmeh2k3t7obl2tsot3h2ss0p1" "data" "writes" 1476824834.187939 [0 127.0.0.1:52353] "expire" "sess_sgmeh2k3t7obl2tsot3h2ss0p1" "1200" 1476824834.257226 [0 127.0.0.1:52353] "select" "0" 1476824834.257239 [0 127.0.0.1:52353] "hmset" "sess_sgmeh2k3t7obl2tsot3h2ss0p1" "data" "_session_validator_data|a:4:{s:11:\"remote_addr\";s:12:\"10.235.34.14\";s:8:\"http_via\";s:0:\"\";s:20:\"http_x_forwarded_for\";s:0:\"\";s:15:\"http_user_agent\";s:115:\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36\";}_session_hosts|a:1:{s:12:\"10.235.32.10\";b:1;}admin|a:0:{}default|a:2:{s:9:\"_form_key\";s:16:\"e331ugBN7vRjGMgk\";s:12:\"visitor_data\";a:3:{s:13:\"last_visit_at\";s:19:\"2016-10-18 21:06:37\";s:10:\"session_id\";s:26:\"sgmeh2k3t7obl2tsot3h2ss0p1\";s:10:\"visitor_id\";s:1:\"9\";}}adminhtml|a:0:{}customer_base|a:1:{s:20:\"customer_segment_ids\";a:1:{i:1;a:0:{}}}checkout|a:0:{}" "lock" "0" ... more ...
Page 缓存
如果你使用redis缓存页面,你会看到类似如下的输出:
1476826133.810090 [0 127.0.0.1:52366] "select" "1" 1476826133.816293 [0 127.0.0.1:52367] "select" "0" 1476826133.817461 [0 127.0.0.1:52367] "hget" "zc:k:ea6_GLOBAL__DICONFIG" "d" 1476826133.829666 [0 127.0.0.1:52367] "hget" "zc:k:ea6_DICONFIG049005964B465901F774DB9751971818" "d" 1476826133.837854 [0 127.0.0.1:52367] "hget" "zc:k:ea6_INTERCEPTION" "d" 1476826133.868374 [0 127.0.0.1:52368] "select" "1" 1476826133.869011 [0 127.0.0.1:52369] "select" "0" 1476826133.869601 [0 127.0.0.1:52369] "hget" "zc:k:ea6_DEFAULT_CONFIG_CACHE_DEFAULT__10__235__32__1080MAGENTO2" "d" 1476826133.872317 [0 127.0.0.1:52369] "hget" "zc:k:ea6_INITIAL_CONFIG" "d" 1476826133.879267 [0 127.0.0.1:52369] "hget" "zc:k:ea6_GLOBAL_PRIMARY_PLUGIN_LIST" "d" 1476826133.883312 [0 127.0.0.1:52369] "hget" "zc:k:ea6_GLOBAL__EVENT_CONFIG_CACHE" "d" 1476826133.898431 [0 127.0.0.1:52369] "hget" "zc:k:ea6_DB_PDO_MYSQL_DDL_STAGING_UPDATE_1" "d" 1476826133.898794 [0 127.0.0.1:52369] "hget" "zc:k:ea6_RESOLVED_STORES_D1BEFA03C79CA0B84ECC488DEA96BC68" "d" 1476826133.905738 [0 127.0.0.1:52369] "hget" "zc:k:ea6_DEFAULT_CONFIG_CACHE_STORE_DEFAULT_10__235__32__1080MAGENTO2" "d" ... more ... 1476826210.634998 [0 127.0.0.1:52439] "hmset" "zc:k:ea6_MVIEW_CONFIG" "d" "a:18:{s:19:\"design_config_dummy\";a:4:{s:7:\"view_id\";s:19:\"design_config_dummy\";s:12:\"action_class\";s:39:\"Magento\\Theme\\Model\\Indexer\\Mview\\Dummy\";s:5:\"group\";s:7:\"indexer\";s:13:\"subscriptions\";a:0:{}}s:14:\"customer_dummy\";a:4:{s:7:\"view_id\";s:14:\"customer_dummy\";s:12:\"action_class\";s:42:\"Magento\\Customer\\Model\\Indexer\\Mview\\Dummy\";s:5:\"group\";s:7:\"indexer\";s:13:\"subscriptions\";a:0:{}}s:13:\"cms_page_grid\";a:4:{s:7:\"view_id\";s:13:\"cms_page_grid\";s:12:\"action_class\";s:43:\"Magento\\Catalog\\Model\\Indexer\\Category\\Flat\";s:5:\"group\";s:7:\"indexer\";s:13:\"subscriptions\";a:1:{s:8:\"cms_page\";a:3:{s:4:\"name\";s:8:\"cms_page\";s:6:\"column\";s:7:\"page_id\";s:18:\"subscription_model\";N;}}}s:21:\"catalog_category_flat\";a:4:{s:7:\"view_id\";s:21:\"catalog_category_flat\";s:12:\"action_class\";s:43:\"Magento\\Catalog\\Model\\Indexer\\Category\\Flat\";s:5:\"group\";s:7:\"indexer\";s:13:\"subscriptions\";a:6:{s:23:\"catalog_category_entity\";a:3:{s:4:\"name\";s:23:\"catalog_category_entity\";s:6:\"column\";s:9:\"entity_id\";s:18:\"subscription_model\";N;}s:31:\"catalog_category_entity_decimal\";a:3:{s:4:\"name\";s:31:\"catalog_category_entity_decimal\";s:6:\"column\";s:9:\"entity_id\";s:18:\"subscription_model\";s:71:\"Magento\\CatalogStaging\\Model\\Mview\\View\\Category\\Attribute\\Subscription\";}s:27:\"catalog_category_entity_int\";a:3:{s:4:\"name\";s:27:\"catalog_category_entity_int\";s:6:\"column\";s:9:\"entity_id\";s:18:\"subscription_model\";s:71:\"Magento\\CatalogStaging\\Model\\Mview\\View\\Category\\Attribute\\Subscription\";}s:28:\"catalog_category_entity_text\";a:3:{s:4:\"name\";s:28:\"catalog_category_entity_text\";s:6:\"column\";s:9:\"entity_id\";s:18:\"subscription_model\";s:71:\"Magento\\CatalogStaging\\Model\\Mview\\View\\Category\\Attribute\\Subscription\";}s:31:\"catalog_category_entity_varchar\";a:3:{s:4:\"name\";s:31:\"catalog_category_entity_varchar\";s:6:\"column\";s:9:\"entity_id\";s:18:\"subscription_model\";s:71:\"Magento\\CatalogStaging\\Model\\Mview\\View\\Category\\Attribute\\Subscription\";}s:32:\"catalog_category_entity_datetime\";a:3:{s:4:\"name\";s:32:\"catalog_category_entity_datetime\";s:6:\"column\";s:9:\"entity_id\";s:18:\"subscription_model\";s:71:\"Magento\\CatalogStaging\\Model\\Mview\\View\\Category\\Attribute\\Subscription\";}}}s:24:\"catalog_category_product\";a:4:{s:7:\"view_id\";s:24:\"catalog_category_product\";s:12:\"action_class\";s:46:\"Magento\\Catalog\\Model\\Indexer\\Category\\Product\";s:5:\"group\";s:7:\"indexer\";s:13:\"subscriptions\";a:2:{s:23:\"catalog_category_entity\";a:3:{s:4:\"name\";s:23:\"catalog_category_entity\";s:6:\"column\" ... more ...
Redis ping 命令
输入下面的命令:
redis-cli ping
等等