tablecache

Simple cache for unwieldily joined relations.

tablecache is a small library that caches tables in a slow database (or, more likely, big joins of many tables) in a faster storage. It allows you to define ways to index the data and then query ranges of records performantly. Not all records have to be loaded into the cache, and ones that aren’t are transparently fetched from the underlying database instead. Cache entries that become invalid must be marked as invalid, but are then refreshed automatically.