Skip to content

The Md5 logic of ConfigCache is rebundant #12872

@Sunrisea

Description

@Sunrisea

Is your feature request related to a problem? Please describe.
Nacos服务端的配置缓存ConfigCache中包含了GBK编码的md5值,但目前Nacos配置中心统一使用的编码方式为UTF-8,GBK编码的md5值并没有使用,这部分代码是多余的
ConfigCache on the Nacos server includes md5 values encoded in GBK, but currently, the Nacos configuration center uniformly uses UTF-8 encoding. The GBK-encoded md5 values are not being used, making this part of the code redundant.

Describe the solution you'd like
重构ConfigCache以及相关的链路(配置监听,配置查询,DumpService),md5字段和相关方法统一使用utf-8编码,并确保对其他类型编码支持的扩展性。
Refactor ConfigCache and related pathways (configuration listening, configuration querying, DumpService) to uniformly use UTF-8 encoding for md5 fields and related methods, and ensure the extensibility for support of other types of encoding.

Describe alternatives you've considered
创建ConfigCacheFactory接口,通过ConfigCacheFactory来进行ConfigCache的创建,相关链路和方法利用SPI机制来保证对于其他类型编码支持的扩展性,并实现默认的UTF-8编码md5值的处理方法
Create the ConfigCacheFactory interface to handle the creation of ConfigCache instances. Utilize the SPI (Service Provider Interface) mechanism in related pathways and methods to ensure extensibility for support of other types of encoding, and implement the default handling methods for UTF-8 encoded md5 values.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions