Added caching for repititive requests on the /v1/complete endpoint#430
Open
ShivamHP wants to merge 1 commit intoanarchy-ai:mainfrom
Open
Added caching for repititive requests on the /v1/complete endpoint#430ShivamHP wants to merge 1 commit intoanarchy-ai:mainfrom
/v1/complete endpoint#430ShivamHP wants to merge 1 commit intoanarchy-ai:mainfrom
Conversation
- Used Flask extension Flask-Caching - Currently uses a local Python dictionary for caching, but can be updated to use Redis - Created a `cache.py` file which stores the config for caching and it also prevents circular imports if written directly in `main.py`. Also, it makes the code better organized
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #362
cache.pyfile which stores the config for caching and it also prevents circular imports if written directly inmain.py. Also, it makes the code better organizedI am also planning to resolve the issue #360. But I need to clarify some doubts: