use of org.broadleafcommerce.common.site.domain.Catalog in project BroadleafCommerce by BroadleafCommerce.
the class SolrIndexCachedOperation method getCache.
/**
* Retrieve the cache bound to the current thread.
*
* @return The cache for the current thread, or null if not set
*/
public static CatalogStructure getCache() {
BroadleafRequestContext ctx = BroadleafRequestContext.getBroadleafRequestContext();
Catalog currentCatalog = ctx == null ? null : ctx.getCurrentCatalog();
if (currentCatalog != null) {
return MapUtils.getObject(CACHE.get(), currentCatalog.getId());
} else {
return MapUtils.getObject(CACHE.get(), DEFAULT_CATALOG_CACHE_KEY);
}
}
Aggregations