-
Notifications
You must be signed in to change notification settings - Fork 12
Feat/cache #276
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
Feat/cache #276
Conversation
|
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.
Pull Request Overview
This PR introduces Redis-backed caching for application configurations and language profiles, standardizes key delimiters from “.” to “:”, and adds a new nonce endpoint for user auth tokens.
- Implement cache read/write for AppConfig and Language endpoints with DB fallback.
- Switch AppConfig key parsing and storage to colon delimiters.
- Add
/user-auth-token/nonceendpoint and bump related dependencies.
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| service/app_config.go | Add cache retrieval and population logic for application configs |
| models/app_config.go | Change key parsing to use : and adjust cache set/get logic |
| apis/user_auth_token.go | Introduce GetNonce endpoint for one-time tokens |
| apis/language.go | Add cache read/write and hooks to invalidate/update language cache |
| pkg/enum.go | Add GethLoginProvider constant |
| models/user.go | Add stub case pkg.GethLoginProvider in Verify |
| center/type.go | Remove unused storage adapter imports |
| dto/user_auth_token.go | Add ResponseNonce struct definition |
| go.mod | Bump multiple module versions |
Comments suppressed due to low confidence (1)
models/app_config.go:101
- The cache nil check is inverted; this block runs only when cache is
nilyet still calls cache methods. It should beif center.GetCache() != nil {to guard cache access.
if center.GetCache() == nil {
|
|
Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes # (issue)
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Please also note any relevant details for your test configuration.
Test Configuration:
Checklist: