use of org.springframework.cache.annotation.CachePut in project entando-core by entando.
the class ContentAuthorizationHelper method getAuthorizationInfo.
@Override
@CachePut(value = ICacheInfoManager.DEFAULT_CACHE_NAME, condition = "#cacheable", key = "T(com.agiletec.plugins.jacms.aps.system.JacmsSystemConstants).CONTENT_AUTH_INFO_CACHE_PREFIX.concat(#contentId)")
@CacheableInfo(groups = "T(com.agiletec.plugins.jacms.aps.system.services.cache.CmsCacheWrapperManager).getContentCacheGroupsCsv(#contentId)")
public PublicContentAuthorizationInfo getAuthorizationInfo(String contentId, boolean cacheable) {
PublicContentAuthorizationInfo authInfo = null;
try {
Content content = this.getContentManager().loadContent(contentId, true, cacheable);
if (null == content) {
_logger.debug("public content {} doesn't exist", contentId);
return null;
}
authInfo = new PublicContentAuthorizationInfo(content, this.getLangManager().getLangs());
} catch (Throwable t) {
_logger.error("error in getAuthorizationInfo for content {}", contentId, t);
}
return authInfo;
}
use of org.springframework.cache.annotation.CachePut in project selenium_java by sergueik.
the class DefaultPropertyService method set.
@CachePut(key = "#properties.class")
@Override
public <T extends Properties> T set(T properties) {
Property entity = new Property(properties.getClass().getSimpleName(), JsonUtils.toString(properties));
propertyRepository.save(entity);
return properties;
}
Aggregations