SQLite Cache
SQLiteCache(path: Path = None, expiry: Optional[int] = 14)
The SQLiteCache object to cache search results from Comicvine.
PARAMETER | DESCRIPTION |
---|---|
path |
Path to database.
TYPE:
|
expiry |
How long to keep cache results.
TYPE:
|
ATTRIBUTE | DESCRIPTION |
---|---|
expiry |
How long to keep cache results.
TYPE:
|
con |
Database connection
TYPE:
|
Functions
delete() -> None
Remove all expired data from the cache database.
insert(query: str, response: Dict[str, Any]) -> None
Insert data into the cache database.
PARAMETER | DESCRIPTION |
---|---|
query |
Search string
TYPE:
|
response |
Data to save
TYPE:
|
select(query: str) -> Dict[str, Any]
Retrieve data from the cache database.
PARAMETER | DESCRIPTION |
---|---|
query |
Search string
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Dict[str, Any]
|
Empty dict or select results. |