(*args: T)
| 311 | ] = {} |
| 312 | |
| 313 | def cache_decorator_wrapper(*args: T) -> U: |
| 314 | if func not in decorator_function_to_instance_map: |
| 315 | decorator_function_to_instance_map[func] = LRUCache(size) |
| 316 | |
| 317 | result = decorator_function_to_instance_map[func].get(args[0]) |
| 318 | if result is None: |
| 319 | result = func(*args) |
| 320 | decorator_function_to_instance_map[func].put(args[0], result) |
| 321 | return result |
| 322 | |
| 323 | def cache_info() -> LRUCache[T, U]: |
| 324 | return decorator_function_to_instance_map[func] |