fixed AssetProfileServiceImpl
This commit is contained in:
parent
6551658bfc
commit
e6473c9c17
@ -110,8 +110,8 @@ public class AssetProfileServiceImpl extends AbstractCachedEntityService<AssetPr
|
||||
public AssetProfile findAssetProfileByName(TenantId tenantId, String profileName, boolean putInCache) {
|
||||
log.trace("Executing findAssetProfileByName [{}][{}]", tenantId, profileName);
|
||||
Validator.validateString(profileName, INCORRECT_ASSET_PROFILE_NAME + profileName);
|
||||
return cache.getAndPutInTransaction(AssetProfileCacheKey.fromName(tenantId, profileName),
|
||||
() -> assetProfileDao.findByName(tenantId, profileName), false);
|
||||
return cache.getOrFetchFromDB(AssetProfileCacheKey.fromName(tenantId, profileName),
|
||||
() -> assetProfileDao.findByName(tenantId, profileName), false, putInCache);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user