2018年3月15日星期四

Magento2开发教程 - 页面缓存概述

缓存是提高各种Web应用程序性能的最有效方法。一般来说,缓存有两种方式:客户端(浏览器)和服务器端。此外,有两种类型的内容:公共(可供多个客户)和私人(具体到一个客户)。

Magento 2 页面缓存是full-page cache; 也就是缓存整个页面

    默认缓存机制存储缓存文件有以下方式:

        在文件系统上.

        你不需要做任何事情,使用基于文件的缓存.
        Database
        Redis

    Varnish (推荐)

可缓存和不可缓存的页面

Cacheable(可缓存) 和 uncacheable(不可缓存) 我们使用的术语是指一个页面是否应该全部缓存。(默认情况下,所有的页面都缓存。)

创建一个不可缓存的页面,页面中的块使用 cacheable="false"标记.

例如 购物车页面,结算页面等等是不可缓存的页面.

Public(公共的)和 私人(private)的内容

Private 页面上的内容仅用于一个用户 ; 例如用户登录的用户名. 在高速缓存页中呈现私有内容有时被称为hole punching ,我们将在下一个主题中更详细地讨论它。

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: