# v2.2.0 release notes

# Introduction

In this release, we improved the backend performance for retrieving filters by adding caching on the server side.

# Migration guide

Caching on the server side is a non-breaking change, migration describes only a way of caching customization.

# middleware.config.js file

We added 2 properties to configuration that allow customization of the cache:

  • sdkSettings.graphqlMaxRetry - number of API call retries when there is no response from BigCommerce GraphQL API (3 retries by default),
  • stdTTL - cache standard Time To Live (1 day by default).
# middleware.config.js

module.exports = {
  integrations: {
    bigcommerce: {
      location: '@vsf-enterprise/bigcommerce-api/server',
      configuration: {
        sdkSettings: {
          logLevel: 'info',
          clientId: process.env.BIGCOMMERCE_API_CLIENT_ID,
          secret: process.env.BIGCOMMERCE_API_CLIENT_SECRET,
          callback: process.env.BIGCOMMERCE_API_URL,
          storeHash: process.env.BIGCOMMERCE_STORE_ID,
          accessToken: process.env.BIGCOMMERCE_API_ACCESS_TOKEN,
          guestToken: process.env.BIGCOMMERCE_STORE_GUEST_TOKEN,
          responseType: 'json',
          headers: { 'Accept-Encoding': '*' },
+         graphqlMaxRetry: Number(process.env.GRAPHQL_MAX_RETRY)
        },
        jwtTokenExpirationDays: 2,
+       stdTTL: 86400,
        secureCookies: process.env.NODE_ENV === 'production'
      }
    }
  }
};