ÃÛ¶¹ÊÓƵ

Configure caching

Commerce 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 Commerce configuration:

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

Caching terminology

Commerce uses the following caching terminology:

  • Frontend—Similar to an interface or gateway to cache storage, implemented by .

  • Cache types—Can be one of the types provided with Commerce or you can .

  • Backend—Specifies details about , implemented by

  • Two-level backend—Stores cache records in two backends: a faster one and a slower one.

    note info
    INFO
    Two-level backend cache configuration is beyond the scope of this guide.

Configuration options

  • Modifying the provided default cache frontend—

    You modify only the <magento_root>/app/etc/di.xml file, the Commerce application’s global dependency injection configuration.

  • Configuring your own custom cache frontend—

    You modify only the <magento_root>/app/etc/env.php file because it overrides the equivalent configuration in the di.xml file.

TIP
Varnish does not require changes to the Commerce configuration. See Configure and use Varnish.
recommendation-more-help
386822bd-e32c-40a8-81c2-ed90ad1e198c