1
0
mirror of https://github.com/squidfunk/mkdocs-material.git synced 2024-12-23 04:44:56 +01:00
mkdocs-material/docs/plugins/requirements/caching.md
2023-09-14 19:09:18 +02:00

1.3 KiB
Raw Blame History

icon
material/database-outline

Caching

Some of the built-in plugins implement intelligent caching mechanisms, which massively speed up consecutive builds by reducing the amount of work that needs to be done. This guide explains how to configure caching in different environments.

Prerequisites

Caching is entirely optional but enabled by default. It can be disabled per plugin. If not configured otherwise, plugins will cache their data in the .cache folder in the root of your project. For this reason it's recommended to create a .gitignore file in the root of your project:

.cache

This ensures that cached files are not added to your git repository something that is generally not recommended to do unless absolutely necessary. In some cases, you might need to check in cached files, e.g. when you need to pre-generate social cards locally, e.g., when you're not be able to install the image processing dependencies in your continuous integration (CI) environment.

In this case, we recommend changing the cache_dir setting something that all plugins that implement caching share to a folder which you add to your git repository.