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) {
|
public AssetProfile findAssetProfileByName(TenantId tenantId, String profileName, boolean putInCache) {
|
||||||
log.trace("Executing findAssetProfileByName [{}][{}]", tenantId, profileName);
|
log.trace("Executing findAssetProfileByName [{}][{}]", tenantId, profileName);
|
||||||
Validator.validateString(profileName, INCORRECT_ASSET_PROFILE_NAME + profileName);
|
Validator.validateString(profileName, INCORRECT_ASSET_PROFILE_NAME + profileName);
|
||||||
return cache.getAndPutInTransaction(AssetProfileCacheKey.fromName(tenantId, profileName),
|
return cache.getOrFetchFromDB(AssetProfileCacheKey.fromName(tenantId, profileName),
|
||||||
() -> assetProfileDao.findByName(tenantId, profileName), false);
|
() -> assetProfileDao.findByName(tenantId, profileName), false, putInCache);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user