Skip to content

Conversation

@peterdudfield
Copy link
Collaborator

@peterdudfield peterdudfield commented Apr 23, 2025

Pull Request

Description

  • use fast-api caching library
  • TODO, remove user from key, but make sure other params are in the cache
  • TODO, old cache, has a way of locking cache if the route is already in process

#399

How Has This Been Tested?

  • CI tests
  • ran against local database, and check cache was working
  • ran 4 same command `` at the same time and average response time was 15

Checklist:

  • My code follows OCF's coding style guidelines
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked my code and corrected any misspellings

yuvraajnarula and others added 2 commits April 23, 2025 09:06
* asynchronus support

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* lint

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* lint pt 2

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* decorator paranthesis added for 422 assertion error

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* token fix

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* test_read_latest_status made synchronus

* lint

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
@peterdudfield
Copy link
Collaborator Author

@yuvraajnarula ive left a TODO to do with making sure the user is not in the cache, but other parameters are. Would you be intereted in doing this?

@yuvraajnarula
Copy link
Contributor

yes, I'll be interested in working on it

@yuvraajnarula
Copy link
Contributor

Hi, @peterdudfield.
I removed the user from cache(other params are present) and refactored database.py using type hints.

@peterdudfield
Copy link
Collaborator Author

Hi, @peterdudfield. I removed the user from cache(other params are present) and refactored database.py using type hints.

Thanks, do you mind, doing separate PRs for these different issues. Just so things dont get confused

@yuvraajnarula
Copy link
Contributor

Hi, @peterdudfield. I removed the user from cache(other params are present) and refactored database.py using type hints.

Thanks, do you mind, doing separate PRs for these different issues. Just so things dont get confused

@peterdudfield I've done exactly as you said #429 for removing user from key, but making sure other params are in the cache, and #432 for database.py type hints support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants