Sphinx-Cache Docs¶
Sphinx-Cache is a Sphinx extension for storing and restoring the .doctrees cache.
Installation¶
We recommend using the latest version of Python. Sphinx-Cache supports Python 3.6 and newer versions.
$ pip install sphinx-cache
$ git clone https://github.com/useblocks/sphinx-cache
$ cd sphinx-cache
$ pip install .
Configuration¶
All configurations take place in your project’s conf.py file.
Activation¶
Add sphinx_cache to the extensions list.
extensions = ["sphinx_cache",]
Options¶
All configuration options start with the prefix cache_ for Sphinx-Cache.
cache_store_path¶
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.pyfile. For example:
cache_store_path = '.cache/'.
Default: .cache/
cache_doctree_path¶
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.pyfile. For example:cache_doctree_path = '_build/.doctrees'.We use the value provided for the
cache_doctree_pathas directory for storing pickled doctrees. If you don’t specify the value for thecache_doctree_pathin theconf.pyfile, we use the default value for thecache_doctree_path(i.e._build/.doctrees).
Default: _build/.doctrees