Cache Information

cache_file(app_name='dwave-penaltymodel-cache', app_author='dwave-systems', filename='penaltymodel_cache_v0.4.3.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.

Parameters
  • 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.

Returns

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

Return type

str

Notes

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.3.db'[source]

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