Python Programming - Decorators - Discussion

Discussion Forum : Decorators - General Questions (Q.No. 10)
10.
When using the @functools.lru_cache decorator, what is the purpose of the maxsize parameter?
Sets the maximum number of cache entries
Controls the cache eviction policy
Determines the cache timeout duration
Specifies the maximum recursion depth for caching
Answer: Option
Explanation:
The maxsize parameter in the @functools.lru_cache decorator specifies the maximum number of entries to be stored in the cache. Once this limit is reached, older entries are evicted.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.