|
@@ -1,6 +1,7 @@
|
|
|
package com.fs.company.cache.impl;
|
|
|
|
|
|
import com.fs.company.cache.ICompanyTagCacheService;
|
|
|
+import com.fs.company.domain.CompanyTag;
|
|
|
import com.fs.company.service.ICompanyTagService;
|
|
|
import com.github.benmanes.caffeine.cache.Cache;
|
|
|
import com.github.benmanes.caffeine.cache.Caffeine;
|
|
@@ -20,7 +21,7 @@ public class CompanyTagCacheServiceImpl implements ICompanyTagCacheService {
|
|
|
.expireAfterWrite(5, TimeUnit.MINUTES)
|
|
|
.build();
|
|
|
|
|
|
- private static final Cache<Long,Map<Long, String>> COMPANY_USER_TAG_CACHE = Caffeine.newBuilder()
|
|
|
+ private static final Cache<Long,Map<Long, CompanyTag>> COMPANY_USER_TAG_CACHE = Caffeine.newBuilder()
|
|
|
.maximumSize(1000)
|
|
|
.expireAfterWrite(5, TimeUnit.MINUTES)
|
|
|
.build();
|
|
@@ -30,7 +31,7 @@ public class CompanyTagCacheServiceImpl implements ICompanyTagCacheService {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public Map<Long, String> queryAllTagMap() {
|
|
|
+ public Map<Long, CompanyTag> queryAllTagMap() {
|
|
|
return COMPANY_USER_TAG_CACHE.get(0L, e-> companyTagService.queryAllTagMap());
|
|
|
}
|
|
|
}
|