Fixing naming scheme for redis caching files
This commit is contained in:
parent
4fd63574c2
commit
c34c3dfa51
6
backend/internal/storage/cache/cache.go
vendored
6
backend/internal/storage/cache/cache.go
vendored
@ -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
|
||||
)
|
||||
|
||||
|
||||
@ -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) {
|
||||
@ -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) {
|
||||
@ -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) {
|
||||
Loading…
Reference in New Issue
Block a user