基于 Guava 实现 tenant 租户数据的本地缓存

This commit is contained in:
YunaiV
2022-06-17 20:28:50 +08:00
parent 31c24cd340
commit e20600f0c2
7 changed files with 10 additions and 215 deletions

View File

@@ -52,14 +52,15 @@ public class TenantFrameworkServiceImpl implements TenantFrameworkService {
});
@Override
@SneakyThrows
public List<Long> getTenantIds() {
return getTenantIdsCache.getUnchecked(Boolean.TRUE);
return getTenantIdsCache.get(Boolean.TRUE);
}
@Override
@SneakyThrows
public void validTenant(Long id) {
validTenantCache.getUnchecked(id).checkError();
validTenantCache.get(id).checkError();
}
}