LRU cache in python