From a735725d116c3e8dca2b4d1cad3425bcd473311c Mon Sep 17 00:00:00 2001 From: George Goldberg Date: Wed, 7 Feb 2018 18:15:07 +0000 Subject: 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. --- store/local_cache_supplier_roles.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'store/local_cache_supplier_roles.go') 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...) } -- cgit v1.2.3-1-g7c22