Tell me about a design pattern or approach you used to improve performance in a software system.
To make the answer concrete, implement an LRU cache, a common performance optimization that avoids repeated expensive work. Given a capacity and operations, return the result of each get operation.
operations contains ['put', key, value] or ['get', key]. Return a list of values for get operations, using -1 for misses.
def lru_cache_operations(capacity, operations):