@@ -115,3 +115,46 @@ To resolve, quote the boolean:
115115
116116 steps :
117117 - bash : echo "{{ parameters.myBoolean}}"
118+
119+ Caching
120+ -------
121+
122+ What data gets cached?
123+ ~~~~~~~~~~~~~~~~~~~~~~
124+
125+ ``check-jsonschema `` will cache all downloaded schemas by default.
126+ The schemas are stored in the ``downloads/ `` directory in your cache dir, and any
127+ downloaded refs are stored in the ``refs/ `` directory.
128+
129+ Where is the cache dir?
130+ ~~~~~~~~~~~~~~~~~~~~~~~
131+
132+ ``check-jsonschema `` detects an appropriate cache directory based on your
133+ platform and environment variables.
134+
135+ On Windows, the cache dir is ``%LOCALAPPDATA%/check_jsonschema/ `` and falls back
136+ to ``%APPDATA%/check_jsonschema/ `` if ``LOCALAPPDATA `` is unset.
137+
138+ On macOS, the cache dir is ``~/Library/Caches/check_jsonschema/ ``.
139+
140+ On Linux, the cache dir is ``$XDG_CACHE_HOME/check_jsonschema/ `` and falls back
141+ to ``~/.cache/check_jsonschema/ `` if ``XDG_CACHE_HOME `` is unset.
142+
143+ How does check-jsonschema decide what is a cache hit vs miss?
144+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
145+
146+ ``check-jsonschema `` checks for cache hits by comparing local file modification
147+ times to the ``Last-Modified `` header present in the headers on an HTTP GET
148+ request. If the local last modified time is older than the header, the rest of
149+ the request will be streamed and written to replace the file.
150+
151+ How do I clear the cache?
152+ ~~~~~~~~~~~~~~~~~~~~~~~~~
153+
154+ There is no special command for clearing the cache. Simply find the cache
155+ directory based on the information above and remove it or any of its contents.
156+
157+ Can I disable caching?
158+ ~~~~~~~~~~~~~~~~~~~~~~
159+
160+ Yes! Just use the ``--no-cache `` CLI option.
0 commit comments