Configuration
CacheHandler
CacheHandler, which will be responsible for the logic of caching.
buildId
A unique id of the current build. It should be same between instances. When launching an application with a new id, the cache for old ids will be deleted.
cacheUrl
A url where the remote cache is running.
cacheMode
The package supports three caching modes: local
, remote
and isomorphic
.
local
A standard solution, the cache is processed next to the application. Convenient to use in development mode and on stages where the application is run in a single instance.
remote
All cache will be written and read on a remote server, launched earlier. Convenient to use for applications running in multiple replicas.
isomorphic
The cache operates next to the application, but additionally stores data on a remote server. Convenient to use during the build, to prepare the cache by the time the application instances are launched, but without spending resources on loading the cache from a remote server.
options
Options passed to cacheHandler
from next.js. They just need to be passed from the argument.