CacheLock

class CacheLock(cache_folder, write_time=True, time_threshold=1800)[source]

Class to lock the cache folder to ensure it doesn’t get hit by another version at the same time.

Methods

CacheLock.__init__(cache_folder[, ...])

Constructor for hed locking object

Attributes

CacheLock.__init__(cache_folder, write_time=True, time_threshold=1800)[source]

Constructor for hed locking object

Parameters:
  • cache_folder (str) – The folder to create the lock in(implicitly locking that folder)

  • write_time (bool) – If true, read and write the cache time. Additionally, won’t operate if too recent. Generally False for local operations.

  • time_threshold (int) – Time before cache is allowed to refresh again.