Skip to content

Conversation

lwnmengjing
Copy link
Member

Description

Checklist

  • the pull request title describes what this PR does (not a vague title like Update index.md)
  • the pull request targets the default branch of the repository (main)
  • no unintentional fmt.Print left behind after debugging
  • did I name variables, methods and classes according to the naming rules? (https://go.dev/doc/effective_go#names)
  • caught exceptions or throw them to the upper level for processing, not ignored (https://go.dev/doc/effective_go#errors)
  • did I explain all possible solutions and why I chose the one I did?
  • added any comments to make new functions clearer
  • tests are added for the changes I made (if any source code was modified)
  • documentation added or updated
  • I have run the project locally and verified that there are no errors
  • instructions for how reviewers can test the code locally
  • screenshot of the feature/bug fix (if applicable)

@lwnmengjing lwnmengjing requested a review from Copilot April 27, 2025 13:47
Copy link

@Copilot 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 adds full support for cache hash operations across both Redis and memory storage implementations while also updating NSQ options with additional serialization tags.

  • Added two new methods HashAll and HashSet to the cache interfaces.
  • Updated NSQOptions to include YAML/JSON serialization tags.
  • Extended memory cache functionality to support hash operations.

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
pkg/config/storage/type.go Added HashAll and HashSet to the AdapterCache interface.
pkg/config/storage/option_nsq.go Updated NSQOptions struct with YAML/JSON tags; potential syntax issue on ReadTimeout field.
pkg/config/storage/cache/redis_test.go Added unit tests for the new hash operations.
pkg/config/storage/cache/redis.go Implemented the new Redis-based hash operations.
pkg/config/storage/cache/memory.go Added memory cache support for hash operations; potential inconsistency in HashSet implementation.

@lwnmengjing lwnmengjing merged commit 554bc11 into main Apr 27, 2025
3 checks passed
@lwnmengjing lwnmengjing deleted the feat/cache-hash branch April 27, 2025 23:07
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.

2 participants