Python LRU cache Implementation