The LazyPagePlugin attempts to reduce the size of the Mosaic filesystem in memory by moving page metadata and content to disk.

It then adds a hook, so that when a page is requested the data is loaded from disk and combined with what is already in the Mosaic filesystem.

Warning

It must be the very last to run so that it can strip off metadata and content after other plugins have finished with them.

This plugin runs with a priority of -2. Needs to be the last to run for biggest impact.

PropertyDescription
cacheDirThe directory to store the cache. Defaults to .mosaic-lazy-page-plugin-cache

This plugin is included in the mosaic config shipped by the Mosaic standard generator. So if you use the below import in your mosaic.config.mjs file then the plugin is included already:

To add it yourself, add the following to the plugins collection:

Note

This plugin needs to be a runtimeOnly plugin because the goal is to reduce the in-memory filesystem size.

Mosaic BETA

Coming soon