Search code examples
pythoncachinglru

LRU cache on disk for python


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.


Solution

  • 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