Fixing naming scheme for redis caching files

This commit is contained in:
Ethan Wellenreiter 2025-05-07 00:18:37 -04:00
parent 4fd63574c2
commit c34c3dfa51
6 changed files with 6 additions and 6 deletions

View File

@ -10,10 +10,10 @@ import (
const (
UserExpTime = time.Minute
RolesExpTime = time.Minute
GroupsExpTime = time.Minute
RoleExpTime = time.Minute
GroupExpTime = time.Minute
UserGroupsExpTime = time.Minute
ReceptsExpTime = time.Minute
ReceiptExpTime = time.Minute
ReceiptImageExpTime = time.Minute
)

View File

@ -46,7 +46,7 @@ func (s *GroupStore) Set(ctx context.Context, group *storage.Group) error {
return err
}
return s.rdb.Set(ctx, cacheKey, json, RolesExpTime).Err()
return s.rdb.Set(ctx, cacheKey, json, RoleExpTime).Err()
}
func (s *GroupStore) Delete(ctx context.Context, id int64) {

View File

@ -45,7 +45,7 @@ func (s *RoleStore) Set(ctx context.Context, role *storage.Role) error {
return err
}
return s.rdb.Set(ctx, cacheKey, json, RolesExpTime).Err()
return s.rdb.Set(ctx, cacheKey, json, RoleExpTime).Err()
}
func (s *RoleStore) Delete(ctx context.Context, name string) {

View File

@ -46,7 +46,7 @@ func (s *UserGroupsStore) Set(ctx context.Context, groups *storage.UserGroups) e
return err
}
return s.rdb.Set(ctx, cacheKey, json, RolesExpTime).Err()
return s.rdb.Set(ctx, cacheKey, json, RoleExpTime).Err()
}
func (s *UserGroupsStore) Delete(ctx context.Context, userid int64) {