Reputation: 565
Am looking for on disk LRU cache package in Python. Most of them are in memory cache.
Main reason is Database access is slow and have limited RAM for in memory LRU. However, large and fast SSD for LRU cache.
Upvotes: 12
Views: 10238
Reputation: 1038
You can also just go with shelve
, which is part of the Python Standard SDK. https://docs.python.org/3/library/shelve.html
Upvotes: 8
Reputation: 3340
One solution is DISKCACHE : http://www.grantjenks.com/docs/diskcache/tutorial.html
The core of DiskCache is diskcache.Cache which represents a disk and file backed cache. As a Cache it supports a familiar Python Mapping interface with additional cache and performance parameter
Upvotes: 12