Python global LRU cache memoization decorator