2018年3月15日星期四

Magento2开发教程 - 副缓存前端缓存类型

Magento 2 缓存概述

Magento 2允许您配置文件系统缓存替代默认缓存。本指南讨论了一些替代方案,即,
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的配置. 有关更多信息,请参见配置和使用Varnish.

步骤1:定义一个前端缓存

Magento 2 的默认前端缓存你可以使用任何缓存类型.
使用 default 缓存类型, 不需要修改env.php 修改 di.xml. 参见引用的主题 低级别缓存选项.
您必须指定一个自定义缓存前端要么 app/etc/env.php 或 app/etc/di.xml.
下面的示例演示如何在 env.php (重写 di.xml):
'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或di.xml缓存配置选项。这个任务是可选的
env.php 例子:
'frontend' => <frontend_type>,
'frontend_options' => [
    <frontend_option> => <frontend_option_value>,
    ...
],
'backend' => <backend_type>,
'backend_options' => [
    <backend_option> => <backend_option_value>,
    ...
],
版权声明:本文为博主原创文章,未经博主允许不得转载。 http://blog.csdn.net/xz_src/article/details/72799645

2 条评论:

  1. Do you need to increase your credit score?
    Do you intend to upgrade your school grade?
    Do you want to hack your cheating spouse Email, whatsapp, Facebook, instagram or any social network?
    Do you need any information concerning any database.
    Do you need to retrieve deleted files?
    Do you need to clear your criminal records or DMV?
    Do you want to remove any site or link from any blog?
    you should contact this hacker, he is reliable and good at the hack jobs..
    contact : cybergoldenhacker at gmail dot com

    回复删除
  2. I can’t say much but with my experience through divorce, I had no one until I met hackingsetting50@gmail.com online then I contacted him, surprisingly he helped me hack into my partner's phone and all his social media platforms and i can now access everything and even documented and printed stuffs to show as evidence , now I’m happy with my kids and working for Riches. I hope this helps anyone in need.

    Thanks.

    回复删除

注意:只有此博客的成员才能发布评论。

Also Read: