feat(subscription): enhance subscription cache management and improve error handling

This commit is contained in:
Chang lue Tsen
2025-08-15 14:45:54 -04:00
parent 740dd48763
commit 2be1c4f6ed
11 changed files with 187 additions and 28 deletions
+2 -1
View File
@@ -46,8 +46,9 @@ var (
func (m *customServerModel) ClearCache(ctx context.Context, id int64) error {
serverIdKey := fmt.Sprintf("%s%v", cacheServerIdPrefix, id)
configKey := fmt.Sprintf("%s%d", config.ServerConfigCacheKey, id)
userListKey := fmt.Sprintf("%s%v", config.ServerUserListCacheKey, id)
return m.DelCacheCtx(ctx, serverIdKey, configKey)
return m.DelCacheCtx(ctx, serverIdKey, configKey, userListKey)
}
// QueryServerCountByServerGroups Query Server Count By Server Groups