use of com.agiletec.plugins.jacms.aps.system.services.contentmodel.ContentModel in project entando-core by entando.
the class ContentModelManagerCacheWrapper method initCache.
@Override
public void initCache(IContentModelDAO contentModelDao) throws ApsSystemException {
try {
Cache cache = this.getCache();
this.releaseCachedObjects(cache);
Map<String, ContentModel> modelsMap = this.getModelsMap(contentModelDao);
super.insertObjectsOnCache(cache, modelsMap);
} catch (Throwable t) {
logger.error("Error bootstrapping models map cache", t);
throw new ApsSystemException("Error bootstrapping models map cache", t);
}
}
use of com.agiletec.plugins.jacms.aps.system.services.contentmodel.ContentModel in project entando-core by entando.
the class CmsCacheWrapperManager method updateFromContentModelChanged.
@Override
public void updateFromContentModelChanged(ContentModelChangedEvent event) {
try {
ContentModel model = event.getContentModel();
_logger.info("Notified content model update : type {}", model.getId());
String cacheGroupKey = JacmsSystemConstants.CONTENT_MODEL_CACHE_GROUP_PREFIX + model.getId();
this.getCacheInfoManager().flushGroup(ICacheInfoManager.DEFAULT_CACHE_NAME, cacheGroupKey);
} catch (Throwable t) {
_logger.error("Error notifing event {}", ContentModelChangedEvent.class.getName(), t);
}
}
Aggregations