Skip to content

Customizable key: user param removal in key #429

Open
yuvraajnarula wants to merge 40 commits intoopenclimatefix:cachefrom
yuvraajnarula:cache_utils_fast_api
Open

Customizable key: user param removal in key #429
yuvraajnarula wants to merge 40 commits intoopenclimatefix:cachefrom
yuvraajnarula:cache_utils_fast_api

Conversation

@yuvraajnarula
Copy link
Contributor

@yuvraajnarula yuvraajnarula commented Apr 24, 2025

This PR updates the generate_cache_key function to exclude the user from the cache key while keeping other parameters.

Changes:

- Filters out any query parameters that have "user" in their name
- Keeps all other parameters for caching
- Maintains the same lock checking functionality

@yuvraajnarula yuvraajnarula changed the title Refactor database.py and user param removal in key Customizable key: user param removal in key Apr 25, 2025
@braddf braddf changed the base branch from main to cache April 29, 2025 16:40
@braddf
Copy link
Contributor

braddf commented Apr 29, 2025

hey @yuvraajnarula, assuming this is part of the same task as #420, could you rebase your branch onto the openclimatefix/cache branch that I've switched this PR to? Just to see what this is specifically changing here 😊

@yuvraajnarula
Copy link
Contributor Author

sure👍

yuvraajnarula and others added 25 commits April 29, 2025 23:01
…x#418)

* dont through 404 error when checking last forecast run

* lint
* add option for turning off the adjustrer

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

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

* add warning

* lint

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* changing N_SLOW_CALLS timeframe to minute

* add N_SLOW_CALLS_PER_MINUTE as environment variable to tests to prevent rate limiting during pytests

* add test for slow rate limiting

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

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

* fix isort error

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
@yuvraajnarula
Copy link
Contributor Author

Hi @peterdudfield and @braddf,
Please let me know if there are any updates on this. Also, I apologise if my previous database refactor PR caused any major issues in the codebase.

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.

4 participants

Comments