定制 msp/apienhancer 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

msp/apienhancer

最新稳定版本:1.0.3

Composer 安装命令:

composer require msp/apienhancer

包简介

README 文档

README

This module replaces MSP_APIBoost.

Install procedure

composer require msp/apienhancer
php bin/magento setup:upgrade

NOTE: If you are using Varnish see below

Features

  • Internal cache support
  • Varnish external support (see below)
  • Products and categories automatic invalidation
  • Support for group based catalog rules

Magento2 REST-API features enhancements:

  • FIX: Catalog rules are not applied in REST-API

Varnish users should read below

Why you may need it?

While using Magento 2 REST API for decoupled frontend (e.g.: a ReactJS or AngularJS frontends), you need to access catalog, search and products.

Every time you perform a REST API call, no matter if you have a FPC configured or not, Magento will compute your request as it was the first one.

With this simple module you will be able to cache API REST requests and get up to a 50x performance boost.

Important: For Varnish users

In order to correctly handle cache invalidation and contents variation you should apply small variations to your varnish VCL file.

Add the following code to your Varnish configuration file at the beginning of vcl_hash section:

hash_data(regsub(std.tolower(req.http.Authorization), "^bearer\s\x22(\w+?):\w+?\x22", "\1"));

Implementation example:

import std
...
sub vcl_hash {
    hash_data(regsub(std.tolower(req.http.Authorization), "^bearer\s\x22(\w+?):\w+?\x22", "\1"));
    ...
}
...

统计信息

  • 总下载量: 65.4k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 82
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 82
  • Watchers: 16
  • Forks: 29
  • 开发语言: PHP

其他信息

  • 授权协议: OSL
  • 更新时间: 2017-06-12