Cache Information

cache_file(app_name='dwave-penaltymodel-cache', app_author='dwave-systems', filename='penaltymodel_cache_v0.4.5.db')[source]

Returns the filename (including path) for the data cache.

The path will depend on the operating system, certain environmental variables and whether it is being run inside a virtual environment. See homebase.

  • app_name (str, optional) – The application name. Default is given by APPNAME.

  • app_author (str, optional) – The application author. Default is given by APPAUTHOR.

  • filename (str, optional) – The name of the database file. Default is given by DATABASENAME.


The full path to the file that can be used as a cache.

Return type



Creates the directory if it does not already exist.

If run inside of a virtual environment, the cache will be stored in /path/to/virtualenv/data/app_name

APPAUTHOR = 'dwave-systems'[source]

The application author is used to determine the cache location.

APPNAME = 'dwave-penaltymodel-cache'[source]

The application name is used to determine the cache location.

DATABASENAME = 'penaltymodel_cache_v0.4.5.db'[source]

The name for the sqlite database itself. Based on the version of the package.