langchain
8cfb2fa1 - core[minor]: Add maxsize for InMemoryCache (#23405)

Commit
1 year ago
core[minor]: Add maxsize for InMemoryCache (#23405) This PR introduces a maxsize parameter for the InMemoryCache class, allowing users to specify the maximum number of items to store in the cache. If the cache exceeds the specified maximum size, the oldest items are removed. Additionally, comprehensive unit tests have been added to ensure all functionalities are thoroughly tested. The tests are written using pytest and cover both synchronous and asynchronous methods. Twitter: @spyrosavl --------- Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
Author
Parents
Loading