refactor(cache): add cache attribute to memoized function wrapper
refactor(test_cache.py): update import statements and function names test(cache): add tests for load_or_build_langchain_object, build_langchain_object_with_caching, build_graph, and cache size limit
This commit is contained in:
parent
fa9825849a
commit
1d5f156a22
2 changed files with 43 additions and 23 deletions
1
src/backend/langflow/cache/base.py
vendored
1
src/backend/langflow/cache/base.py
vendored
|
|
@ -48,6 +48,7 @@ def memoize_dict(maxsize=128):
|
|||
cache.clear()
|
||||
|
||||
wrapper.clear_cache = clear_cache # type: ignore
|
||||
wrapper.cache = cache # type: ignore
|
||||
return wrapper
|
||||
|
||||
return decorator
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue