black/docs
Perry Vargas 10677baa40
Allow setting custom cache directory on all platforms (#2739)
Fixes #2506

``XDG_CACHE_HOME`` does not work on Windows. To allow for users to set a custom cache directory on all systems I added a new environment variable ``BLACK_CACHE_DIR`` to set the cache directory. The default remains the same so users will only notice a change if that environment variable is set.

The specific use case I have for this is I need to run black on in different processes at the same time. There is a race condition with the cache pickle file that made this rather difficult. A custom cache directory will remove the race condition.

I created ``get_cache_dir`` function in order to test the logic. This is only used to set the ``CACHE_DIR`` constant.
2022-01-21 22:00:33 -08:00
..
_static Switch to Furo (#2793) 2022-01-21 15:00:13 -08:00
compatible_configs fix #1917 (#1918) 2021-01-11 08:21:14 -08:00
contributing Allow setting custom cache directory on all platforms (#2739) 2022-01-21 22:00:33 -08:00
guides Change cfg to ini for text highlighting (#2632) 2021-11-21 07:02:08 -08:00
integrations Remove Python 2 support (#2740) 2022-01-10 04:16:30 -08:00
the_black_code_style Deprecate ESP and move the functionality under --preview (#2789) 2022-01-20 15:42:07 -08:00
usage_and_configuration Allow setting custom cache directory on all platforms (#2739) 2022-01-21 22:00:33 -08:00
authors.md Fix and test docs on Windows (#2262) 2021-05-26 19:04:10 -07:00
change_log.md Fix and test docs on Windows (#2262) 2021-05-26 19:04:10 -07:00
conf.py Switch to Furo (#2793) 2022-01-21 15:00:13 -08:00
faq.md Switch to Furo (#2793) 2022-01-21 15:00:13 -08:00
getting_started.md Change installation url to comply with git security change (#2765) 2022-01-11 14:37:07 -08:00
index.rst Switch to Furo (#2793) 2022-01-21 15:00:13 -08:00
license.rst Reorganize docs v2 (GH-2174) 2021-05-08 15:17:38 -04:00
make.bat add sphinx docs skeleton (#71) 2018-03-23 14:27:04 -07:00
Makefile Add EOF and trailing whitespace fixer to pre-commit config (#2330) 2021-06-13 10:22:46 -07:00
requirements.txt Switch to Furo (#2793) 2022-01-21 15:00:13 -08:00