Skip to content

Conversation

@lwnmengjing
Copy link
Member

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.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

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 A
  • Test B

Test Configuration:

  • Firmware version:
  • Hardware:
  • Toolchain:
  • SDK:

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@lwnmengjing lwnmengjing requested review from Copilot and mss-boot May 28, 2025 12:08
@github-actions
Copy link

Field Coverage
total: 3.8%

Copy link

Copilot AI left a 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/nonce endpoint 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 nil yet still calls cache methods. It should be if center.GetCache() != nil { to guard cache access.
if center.GetCache() == nil {

@github-actions
Copy link

Field Coverage
total: 3.8%

@github-actions
Copy link

Field Coverage
total: 3.8%

@lwnmengjing lwnmengjing merged commit dd3bb64 into main May 28, 2025
1 check passed
@lwnmengjing lwnmengjing deleted the feat/cache branch May 28, 2025 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants