refactor: Give more instance caching flexibility to the storage clients#1425
Merged
Merged
Conversation
- StorageClient is not individual storage key and is instead used in additional cache key
janbuchar
reviewed
Sep 24, 2025
| Can be based on configuration or on the client itself. By default, returns a name of the client class. | ||
| """ | ||
| return '' | ||
| return self.__class__.__name__ |
Collaborator
There was a problem hiding this comment.
Two points regarding this method:
self.__class__.__name__is not unique enough - could you at least attach__module__as well?- the name of the method will not be very fitting after this PR
Collaborator
Author
There was a problem hiding this comment.
Using module as well now.
But not sure about renaming, I am quite content with it. Do you have any better name in mind?
Collaborator
There was a problem hiding this comment.
Maybe something like get_storage_client_cache_key?
Collaborator
Author
There was a problem hiding this comment.
StorageClient.get_storage_client_cache_key feels kind of redundant, since the class is StorageClient and its children
Collaborator
There was a problem hiding this comment.
I get it, but most people don't need to use it, so I wouldn't be too sad about that
janbuchar
approved these changes
Sep 24, 2025
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.
Description
StorageClienttype is not an individual storage key and is instead used in an additional cache key (can be overridden).StorageClientsto have better control over caching.Issues
Testing