Export cache helper

This commit is contained in:
Taras Kushnir
2025-11-23 08:13:22 +02:00
parent ad1a7fcc43
commit f4643f830a
2 changed files with 5 additions and 5 deletions

View File

@@ -604,7 +604,7 @@ func (impl *BusinessStoreImpl) retrieveUser(ctx context.Context, userID int32) (
}
if impl.querier != nil {
reader.QueryKeyFunc = queryKeyInt
reader.QueryKeyFunc = QueryKeyInt
reader.QueryFunc = impl.querier.GetUserByID
}
@@ -788,7 +788,7 @@ func (impl *BusinessStoreImpl) RetrieveSubscription(ctx context.Context, sID int
}
if impl.querier != nil {
reader.QueryKeyFunc = queryKeyInt
reader.QueryKeyFunc = QueryKeyInt
reader.QueryFunc = impl.querier.GetSubscriptionByID
}
@@ -1001,7 +1001,7 @@ func (impl *BusinessStoreImpl) RetrieveOrganizationUsers(ctx context.Context, or
}
if impl.querier != nil {
reader.QueryKeyFunc = queryKeyInt
reader.QueryKeyFunc = QueryKeyInt
reader.QueryFunc = impl.querier.GetOrganizationUsers
}
@@ -1592,7 +1592,7 @@ func (impl *BusinessStoreImpl) RetrieveSystemNotification(ctx context.Context, i
}
if impl.querier != nil {
reader.QueryKeyFunc = queryKeyInt
reader.QueryKeyFunc = QueryKeyInt
reader.QueryFunc = impl.querier.GetSystemNotificationById
}

View File

@@ -179,7 +179,7 @@ func FetchCachedArray[T any](ctx context.Context, cache common.Cache[CacheKey, a
return nil, errInvalidCacheType
}
func queryKeyInt(ck CacheKey) (int32, error) {
func QueryKeyInt(ck CacheKey) (int32, error) {
return ck.IntValue, nil
}