Closed miratcan closed 1 month ago
Tinydb is just a dict of objects keyed from "1" and upwards, It is intended as a simple structure for small datasets. You can cache on the outside by adding a wrapper around the db.search() routine. if you need this then go for redis or another database.
I full agree with @fenchu. If you're in a state where you gain a significant amount of performance by persisting the query cache, I think you'd gain at least an order of magnitude by switching to a more sophisticated database system like Sqlite (which has quite extensive JSON support!) or something like DuckDB.
(If there is it can be run very fast I think.)