PHP 7.3 reaches end of support in December 2021 and Adobe Commerce 2.3.x reaches end of support in April 2022. You may want to consider planning your upgrade now to Adobe Commerce 2.4.x and PHP 7.4.x to help maintain PCI compliance.

Configure caching

Magento enables you to configure alternatives to the default file system caching. This guide discusses some of those alternatives; namely,

  • Set up the following cache mechanisms in the Magento configuration:

    • Database
    • Redis
    • File system (default): No configuration is necessary to use file system caching.
  • Set up the Varnish without modifying the Magento configuration.

We’ll periodically add more cache alternatives so watch this space.

Magento uses the following caching terminology:

  • Frontend: Similar to an interface or gateway to cache storage, implemented by Magento\Framework\Cache\Frontend.
  • Cache types: Can be one of the types provided with Magento or you can create your own.
  • Backend: Specifies details about cache storage, implemented by Magento\Framework\Cache\Backend
  • Two-level backend: Stores cache records in two backends—a faster one and a slower one.

    Two-level backend cache configuration is beyond the scope of this guide at this time.

This topic discusses the following options for configuring caching:

  • Modifying the provided default cache frontend, which means you modify only <magento_root>/app/etc/di.xml (the Magento application’s global dependency injection configuration)
  • Configuring your own custom cache frontend, which means you modify only <magento_root>/app/etc/env.php because it overrides the equivalent configuration in di.xml

Varnish requires no changes to the Magento configuration. For more information, see Configure and use Varnish.