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
[WIP] feat: add cache provider implementation #4169
Draft
milosgajdos
wants to merge
6
commits into
distribution:main
Choose a base branch
from
milosgajdos:add-cache-providers
base: main
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
+622
−307
Commits on Nov 23, 2023
-
feat: add cache provider implementation
currently the only two implementation of cache are redis and inmemory. This commit introduces cache providers that let you implement your own blbodescriptor cache of choice and plug it in. Co-authored-by: Gladkov Alexey <agladkov@redhat.com> Signed-off-by: Milos Gajdos <milosthegajdos@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for d38096a - Browse repository at this point
Copy the full SHA d38096aView commit details
Commits on Dec 7, 2023
-
Update registry/storage/cache/provider/cacheprovider.go
Co-authored-by: Cory Snider <corhere@gmail.com> Signed-off-by: Milos Gajdos <milosgajdos83@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 30f8cf7 - Browse repository at this point
Copy the full SHA 30f8cf7View commit details -
update: make cacheprovider.Register panic on error
This func is meant to be used from init funcs of specific cacheprovider implementations. If they fail to register we should panic. Signed-off-by: Milos Gajdos <milosthegajdos@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 90665be - Browse repository at this point
Copy the full SHA 90665beView commit details
Commits on Dec 8, 2023
-
refactor: complete refactoring of cache providers and cache config
This commit reworks cache provider setup and configuration. Cache now has a dedicated configuration structure instead of being part of the storage configuration. This simplifies the code quite a bit at the expense of sad configuration decoding. This commit now allows for adding of new cache providers should there be such need in the future. Currently we continue to provide only redis and inmemory cache. In line with this the existing cache implementation: inmemory and redis have now been "turned" into cache providers which also simplifies the code. Cache configuration is now expected to be set the following options: provider - name of the cache provider params - arbitrary set of config params for the given cache provider. Each cache provider must register itself via init func so it's loaded on startup and available if the config requires it. Redis configuration has been removed from the main configuration because its only ever been used for configuring caches and nothing else so it makes no sense to keep it in the global config. Documentation has been updated accordingly. Signed-off-by: Milos Gajdos <milosthegajdos@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 15bdb51 - Browse repository at this point
Copy the full SHA 15bdb51View commit details -
Co-authored-by: Cory Snider <corhere@gmail.com> Signed-off-by: Milos Gajdos <milosgajdos83@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 6e079b8 - Browse repository at this point
Copy the full SHA 6e079b8View commit details -
Co-authored-by: Cory Snider <corhere@gmail.com> Signed-off-by: Milos Gajdos <milosgajdos83@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 7bf9aae - Browse repository at this point
Copy the full SHA 7bf9aaeView commit details
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.