Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement auto cache removal #21

Draft
wants to merge 29 commits into
base: main
Choose a base branch
from
Draft

Conversation

seapagan
Copy link
Owner

@seapagan seapagan commented Mar 31, 2024

WIP to implement auto cache removal when a PUSH/PUT etc modifies the data.

This is done using a @expires decorator to the route that potentially changes data. At the moment, it will expire anyway, need to ensure it doesn't expire if the data is unchanged (check the status on the decorated function return - perhaps add this as an option to the constructor)

There will also be a method to manually expire a cache key on demand.

Coverage will fail for this PR until the new code is added to tests

@seapagan seapagan added the enhancement New feature or request label Mar 31, 2024
@seapagan seapagan self-assigned this Mar 31, 2024
Copy link

codacy-production bot commented Mar 31, 2024

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
-6.67% (target: -1.00%) 32.35%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (b7b7dc8) 279 258 92.47%
Head commit (7615899) 310 (+31) 266 (+8) 85.81% (-6.67%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#21) 34 11 32.35%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences


🚀 Don’t miss a bit, follow what’s new on Codacy.

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

@seapagan seapagan force-pushed the implement-auto-cache-removal branch from 3df0e25 to 7eab470 Compare June 4, 2024 09:33
@seapagan seapagan marked this pull request as ready for review June 4, 2024 09:34
@seapagan seapagan marked this pull request as draft June 4, 2024 09:35
@seapagan seapagan force-pushed the implement-auto-cache-removal branch from 7eab470 to 235433c Compare June 4, 2024 14:41
Signed-off-by: Grant Ramsay <[email protected]>
Signed-off-by: Grant Ramsay <[email protected]>
Signed-off-by: Grant Ramsay <[email protected]>
…stapi-redis-cache-reborn into implement-auto-cache-removal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant