-
Notifications
You must be signed in to change notification settings - Fork 267
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
Add new caching logic to all-transactions #2000
Conversation
No need to use a |
b6de858
to
05f971d
Compare
cf78136
to
5445a49
Compare
5445a49
to
0b8f25b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really good work and nice refactor, but I'm missing docs for better understanding this feature, as its really important and critical for the service
safe_transaction_service/history/services/transaction_service.py
Outdated
Show resolved
Hide resolved
safe_transaction_service/history/services/transaction_service.py
Outdated
Show resolved
Hide resolved
return (None, None) | ||
|
||
|
||
def _clean_all_txs_cache(instance): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add docs. Also maybe another python file is better to add these helper methods, as we are merging a lot of things in the signals file. Maybe refactoring all this logic into a class (if possible) could make sense
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, I think that we could create a class for all the caching related with endpoints and mange the invalidation there.
We could reuse this caching methods to endpoints like multisig transactions, module transactions.
Issue created here #2008
5dc998b
to
3798fdd
Compare
Add cache functions documentation
3798fdd
to
d2af06b
Compare
Description
cache_dir
with "all-txs:safe-address"unlink
from signal providing thecache_dir
to remove all thecache_fields
behind thecache_dir
.Closes #1931