dwave-cloud-client icon indicating copy to clipboard operation
dwave-cloud-client copied to clipboard

Implement cache control via environment variable(s)

Open randomir opened this issue 1 year ago • 0 comments

Similarly to config file location environment variable, DWAVE_CONFIG_FILE, add an option to control cache directory location (for region and solver metadata cache, etc) from the environment.

For example, DWAVE_CACHE_HOME.

An option to disable disk caching could be implemented either via a separate variable, or as a special-meaning value, such as DWAVE_CACHE_HOME=disabled.

While implementing this, have in mind we'll eventually want to have a shared Ocean cache control/interface, see https://github.com/dwavesystems/minorminer/issues/242.

Another control dimension would be cache type: memory (dwave.cloud.utils.cached), disk (dwave.cloud.utils.cached.ondisk or diskcache), memcached?, redis?, etc.

randomir avatar Apr 10 '24 11:04 randomir