relstorage.cache.persistence – Helpers for various disk-based persistent storage format#

Helpers for various disk-based persistent storage format.

Doesn’t actually do any persistence itself.

exception Sqlite3TooOldError(*_args)[source]#

Bases: ValueError

Raised if the sqlite3 module is too old.

sqlite_connect(options, prefix, overwrite=False, **connect_kwargs)[source]#

Return a DB-API Connection object.

If the database is corrupted, the file will be removed and recreated.

Caution

Using the connection as a context manager does not result in the connection being closed, only committed or rolled back.

sqlite_files(options, prefix)[source]#

Calculate the sqlite filename and return it, plus a function that will destroy the sqlite file.