Magento Enterprise Cloud Edition enables you to use caching in your environment. If you disable caching, Magento Enterprise Cloud Edition directly serves the files.
Set up caching
Enable caching in your Magento application’s
.magento/routes.yaml as follows:
If you need fine-grained caching, you can set up caching rules for several routes separately as the following example shows:
The preceding example caches the following routes:
And the following routes are not cached:
Regular expressions in routes are not supported.
The cache duration is determined by the
header value. If no
Cache-Control header is in the response, we use the
To decide how to cache a response, Magento Enterprise Cloud Edition builds a cache key
depending on several factors and store the response associated with this
key. When a request comes with the same cache key, the response is
reused. Its purpose is similar to the HTTP
cookies keys enable you to change this cache key.
The default value for these keys follows:
We support the following attributes:
When set to
true, enable the cache for this route. When set to
false, disable the cache for this route.
Defines on which values the cache key must depend.
For example, if the
headers key is the following:
Then Magento Enterprise Cloud Edition will cache a different response for each value of the
Accept HTTP header.
cookies key define on which values the cache key must depend.
The cache key depends on the value of the
value cookie in the
A special case exists if the
cookies key has the
["*"] value. This value
means that any request with a cookie will bypass the cache. This is the
You cannot use wildcards in the cookie name. You must either use a precise cookie name, or match all cookies with asterisk (
~SESS are currently not valid values.
If the response does not have a
Cache-Control header, the
default_ttl key is used to define the cache duration, in seconds. The
default value is
0, which means nothing is cached.