msp/apienhancer
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"));
...
}
...
msp/apienhancer 适用场景与选型建议
msp/apienhancer 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 65.53k 次下载、GitHub Stars 达 82, 最近一次更新时间为 2017 年 06 月 12 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 msp/apienhancer 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 msp/apienhancer 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 65.53k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 82
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: OSL
- 更新时间: 2017-06-12