Python Cookbook : LRU cache decorator
June 3rd, 2007 Posted in Programming, Python
Python Cookbook : LRU cache decorator
Looks interesting - from the description:
One-line decorator call adds caching to functions with hashable arguments and no keyword arguments. When the maximum size is reached, the least recently used entry is discarded -- appropriate for long-running processes which cannot allow caches to grow without bound. Includes built-in performance instrumentation.

