Skip to main content

A smarter query cache for TinyDB

Project description

Build Status Coverage Version

tinydb-smartcache provides a smart query cache for TinyDB. It updates the query cache when inserting/removing/updating elements so the cache doesn’t get invalidated. It’s useful if you perform lots of queries while the data changes only little.

Usage

>>> from tinydb import TinyDB
>>> from tinydb_smartcache import SmartCacheTable
>>> db = TinyDB('db.json')
>>> db.table_class = SmartCacheTable
>>> db.table('foo')
>>> # foo will now use the smart query cache

If you want to enable TinyDB for all databases in a session, run:

>>> from tinydb import TinyDB
>>> from tinydb_smartcache import SmartCacheTable
>>> TinyDB.table_class = SmartCacheTable
>>> # All databases/tables will now use the smart query cache

Changelog

v1.0.1 (2015-11-17)

  • Fix installation via pip

v1.0.0 (2015-09-17)

  • Initial release on PyPI

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tinydb-smartcache-1.0.1.zip (6.1 kB view details)

Uploaded Source

File details

Details for the file tinydb-smartcache-1.0.1.zip.

File metadata

File hashes

Hashes for tinydb-smartcache-1.0.1.zip
Algorithm Hash digest
SHA256 9ed53653ec2e934ea305080b9e0007ffc957a048a6c0d04a8bff10be2e9e508e
MD5 2af301d122405b33c68ee6f40347dcc1
BLAKE2b-256 c3e2e52b4b3b4e57a1aa7995ba9dc930839db4b605472ea6995ccae77184a9ab

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page