diff options
author | George Goldberg <george@gberg.me> | 2018-02-07 18:15:07 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-07 18:15:07 +0000 |
commit | a735725d116c3e8dca2b4d1cad3425bcd473311c (patch) | |
tree | 7253153de1bbdc8ede107c7c93e90c3ce2b2afe9 /store/local_cache_supplier_roles.go | |
parent | a04b02081a77497ecfc7a5ae9ffb0ca28404dd0e (diff) | |
download | chat-a735725d116c3e8dca2b4d1cad3425bcd473311c.tar.gz chat-a735725d116c3e8dca2b4d1cad3425bcd473311c.tar.bz2 chat-a735725d116c3e8dca2b4d1cad3425bcd473311c.zip |
XYZ-59: Implement redis caching layer for Role store. (#8207)
* XYZ-59: Implement redis caching layer for Role store.
* Use variable for key where used more than once.
Diffstat (limited to 'store/local_cache_supplier_roles.go')
-rw-r--r-- | store/local_cache_supplier_roles.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/store/local_cache_supplier_roles.go b/store/local_cache_supplier_roles.go index a9cbda017..8cbde0a23 100644 --- a/store/local_cache_supplier_roles.go +++ b/store/local_cache_supplier_roles.go @@ -25,6 +25,8 @@ func (s *LocalCacheSupplier) RoleSave(ctx context.Context, role *model.Role, hin } func (s *LocalCacheSupplier) RoleGet(ctx context.Context, roleId string, hints ...LayeredStoreHint) *LayeredStoreSupplierResult { + // Roles are cached by name, as that is most commonly how they are looked up. + // This means that no caching is supported on roles being looked up by ID. return s.Next().RoleGet(ctx, roleId, hints...) } |