find_work.cache#

Implementation of caching functionality.

find_work.cache.write_raw_json_cache(data: SupportsBytes, cache_key: SupportsBytes) None#

Write a JSON cache file in a temporary directory.

This function silently fails on OS errors.

Parameters:
  • data – raw JSON

  • cache_key – cache key object

find_work.cache.read_raw_json_cache(cache_key: SupportsBytes) bytes#

Read a JSON cache file stored in a temporary directory.

Parameters:

cache_key – cache key object

Returns:

raw JSON file contents or empty byte string