Scrivito lets you add a custom 2nd-level cache to its cache store chain using Scrivito::Configuration.second_level_cache
. This is useful when deploying to Heroku, for example, because the file system offered by this service is volatile.
By default, no second-level cache is configured. If it is set, Scrivito stores its cache both in the file system cache and the second-level cache. Also, Scrivito will search the second-level cache if searching the file system cache doesn't return any results. If the second-level cache returns results, they are stored in the file system cache. Here's a configuration example: