2017 © Pedro Peláez
 

magento2-module apienhancer

image

msp/apienhancer

  • Thursday, September 28, 2017
  • by magespecialist
  • Repository
  • 11 Watchers
  • 38 Stars
  • 2,629 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 5 Forks
  • 1 Open issues
  • 4 Versions
  • 23 % Grown

The README.md

MSP APIEnhancer

This module replaces MSP_APIBoost., (*1)

Install procedure

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

NOTE: If you are using Varnish see below, (*2)

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, (*3)

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., (*4)

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., (*5)

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

Important: For Varnish users

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

Add the following code to your Varnish configuration file at the beginning of vcl_hash section:, (*8)

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

Implementation example:, (*10)

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

The Versions

28/09 2017

dev-master

9999999-dev

  Sources   Download

OSL 3.0

The Requires

 

28/09 2017

1.0.2

1.0.2.0

  Sources   Download

OSL 3.0

The Requires

 

14/09 2017

1.0.1

1.0.1.0

  Sources   Download

OSL 3.0

The Requires

  • php ^7.0|^7.1

 

12/06 2017

1.0.0

1.0.0.0

  Sources   Download

OSL 3.0

The Requires

  • php ~7.0.0