Sphinx-Cache is a Sphinx extension for storing and restoring the .doctrees cache.
We recommend using the latest version of Python. Sphinx-Cache supports Python 3.6 and newer versions.
Using pip
$ pip install sphinx-cache
From source
$ git clone https://github.com/useblocks/sphinx-cache
$ cd sphinx-cache
$ pip install .
All configurations take place in your project's conf.py
file.
Add sphinx_cache to the extensions list.
extensions = ["sphinx_cache",]
All configuration options start with the prefix cache_
for Sphinx-Cache.
The cache_store_path
option specifies the directory path where you want to save the doctree cache files.
Note
- The path should be specified as a relative path relative to the directory of the
conf.py
file. - For example:
cache_store_path = '.cache/'
.
Default: .cache/
The cache_doctree_path
option specifies the directory path of the doctree folder.
Note
- The path should be specified as a relative path relative to the directory of the
conf.py
file. For example:cache_doctree_path = '_build/.doctrees'
. - We use the value provided for the
cache_doctree_path
as directory for storing pickled doctrees. If you don't specify the value for thecache_doctree_path
in theconf.py
file, we use the default value for thecache_doctree_path
(i.e._build/.doctrees
).
Default: _build/.doctrees