From e873e685d21031348f6e19851b80872439e3e3f4 Mon Sep 17 00:00:00 2001 From: rico <235038369@qq.com> Date: Thu, 6 Aug 2026 15:44:57 +0800 Subject: [PATCH] fix(storage): namespace Redis ID key --- src/storage/redis.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/storage/redis.go b/src/storage/redis.go index f691fad..8b1f945 100644 --- a/src/storage/redis.go +++ b/src/storage/redis.go @@ -27,12 +27,15 @@ func CacheMGet(ctx context.Context, keys []string) [][]byte { return storage.MGet(ctx, Cache, keys) } -const IDINITIAL = 1 << 32 +const ( + IDINITIAL = 1 << 32 + idKey = "n9e_ibex_id" +) func IdInit() error { - return Cache.Set(context.Background(), "id", IDINITIAL, 0).Err() + return Cache.Set(context.Background(), idKey, IDINITIAL, 0).Err() } func IdGet() (int64, error) { - return Cache.Incr(context.Background(), "id").Result() + return Cache.Incr(context.Background(), idKey).Result() }