minorminer icon indicating copy to clipboard operation
minorminer copied to clipboard

Make bisclique cache location more configurable

Open arcondello opened this issue 1 year ago • 2 comments

Currently a user can override the cache location, but it's pretty inelegant

import os 

import minorminer.busclique

def myfileloc(version=None):
    dir_path = os.path.dirname(os.path.realpath(__file__))
    return os.path.join(dir_path, "clique_cache")
minorminer.busclique.busgraph_cache.cache_rootdir = myfileloc

it would be nice to have an official API for specifying the cache location

arcondello avatar Jan 25 '24 00:01 arcondello

I agree. Moreover, it would be nice to have consistent cache interface(s) across the whole Ocean. Some preliminary cache control improvements have been done in https://github.com/dwavesystems/dwave-cloud-client/pull/579, but they don't cover on-disk cache control.

randomir avatar Jan 25 '24 13:01 randomir

I agree, @randomir. The disk cache I wrote here is entirely out of place, I hate just about every line of it, and I do not want to continue maintaining it if at all possible. If a better solution exists (I've only perused the bullet points of https://pypi.org/project/diskcache/ but it looks perfect) we should use that.

boothby avatar Jan 25 '24 16:01 boothby