feat: Improve caching logic and add disk caching option (#3246)

* feat: add diskcache package version 5.6.3 to poetry.lock and pyproject.toml for improved caching functionality

* refactor: simplify CacheMiss import in cache service files for better clarity and maintainability

* feat: Add AsyncDiskCache class for disk-based caching

* feat: Add disk caching option in CacheServiceFactory with AsyncDiskCache

* feat: Restrict cache_type to specific literals: async, redis, memory, disk for enhanced type safety and clarity

* feat: Change get_requester_result to async await for proper async handling in Vertex class

* fix: Update outputs dictionary in ResultData class to use key-value pairs for better readability and maintainability

* fix: Improve caching logic in Graph class by ensuring vertex builds properly handle exceptions and cache updates more reliably

* feat: Add teardown method to AsyncDiskCache for clearing cache directory during cleanup process

* fix: Correct variable name in Graph class to ensure proper handling of vertex results in caching logic

* feat: Clear AsyncDiskCache on initialization to align behavior with in-memory cache until frontend handling is implemented
This commit is contained in:
Gabriel Luiz Freitas Almeida 2024-08-09 09:42:21 -03:00 • committed by GitHub
commit 56ecb18ef5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 157 additions and 32 deletions

View file

@ -79,6 +79,7 @@ filelock = "^3.15.4"
grandalf = "^0.8.0"
crewai = "^0.36.0"
spider-client = "^0.0.27"
diskcache = "^5.6.3"
[tool.poetry.extras]