Select version
v7.13 v7.12 v7.11 v7.9 v7.8 v7.7 v7.6 v7.5 v7.3 v7.1 v7.0 v6.8 v6.7 v6.6 v6 v5 v4 v3 v2

Work with Ucommerce Caching

Ucommerce uses NHibernate and NHibernate Cache.

NHibernate has a 1st level cache per session (always in memory) and a 2nd level cache per factory (provider based).

Ucommerce uses the Nibernate 2nd level Cache for some entities, look at the list below. Ucommerce uses the NHibernate Query cache for some quries, look at the list below.

By default, Ucommerce uses NHibernate SysCache, but this can be changed to another provider if needed. Since SysCache uses the ASP.NET Cache, changing the ASP.NET Cache Provider is also a possibility to change to another cache store.

Ucommerce has 5 distinct cache regions defined.

  • CatalogFoundation
  • MarketingFoundation
  • TransactionFoundation
  • SecurityFoundation
  • Backend

How to clear the cache

Clearing the whole cache can be done with the ICacheProvider

    
    public interface ICacheProvider
    	{
    		void ClearCache();
    	}
    

How to set the timeout for the cache regions

In web.config the timeout of the different regions can be set.

    
      <syscache>
        <!-- Cache catalog objects for 60 mins before refreshing -->
        <cache region="CatalogFoundation" expiration="3600" priority="5"/>
        <cache region="MarketingFoundation" expiration="3600" priority="5"/>
        <cache region="SecurityFoundation" expiration="3600" priority="5"/>
        <cache region="Backend" expiration="3600" priority="5"/>
      </syscache>
    

How to turn off the cache

The NHibernate Cache can be disabled in web.config

    
      <commerce>
        <runtimeConfiguration enableCache="false"
         ...
      </commerce>
    

This should only be used for troubleshooting and can have severe impact on performance.

What entities do Ucommerce cache in the 2nd level cache?

Note! No Order entities are cached.

CatalogFoundation

  • Category
  • CategoryProductRelation
  • CategoryProperty
  • Currency
  • DataTypeEnumDescription
  • DataTypeEnum
  • DataType
  • DefinitionField
  • DefinitionMap
  • DefinitionTypeDescription
  • DefinitionType
  • PriceGroup
  • ProductCatalogGroup
  • ProductCatalog
  • ProductDefinitionFieldDescription
  • ProductDefinition
  • ProductDescription
  • ProductDescriptionProperty
  • Product
  • ProductProperty
  • ProductRelation
  • ProductRelationType
  • ProductReviewComment
  • ProductReview
  • ProductReviewStatus

MarketingFoundation

  • CampaignItem
  • CampaignItemProperty
  • Campaign
  • Target

TransactionFoundation

  • Country
  • DefinitionFieldDescription
  • EmailContent
  • EmailParameter
  • EmailProfileInformation
  • EmailProfile
  • EmailType
  • OrderStatus
  • PaymentMethodDescription
  • PaymentMethod
  • PaymentStatus
  • ShippingMethodDescription
  • ShippingMethod
  • ShippingMethodPrice

SecurityFoundation

  • Role
  • UserGroup
  • User

Backend

  • AdminPage
  • AdminTab
  • EntityUiDescription
  • EntityUi

What Queries do Ucommerce cache in the Query Cache?

Note! No Order queries are cached.

CatalogFoundation

  • TabsForPageQuery
  • AllCategoriesForCatalogQuery
  • AllCategoriesQuery
  • AllProductDefinitionsQuery
  • AllProductsQuery
  • AllProductTreeViewQuery
  • AllProductVariantTreeViewQuery
  • CategoriesInCatalogQuery
  • CategoriesInCategoryQuery
  • CategoryDefinitionIdQuery
  • CategoryTreeViewByCategoryIdsQuery
  • CategoryTreeViewQuery
  • ChildCategoryQuery
  • FullProductDefinitionsQuery
  • MultipleProductQuery
  • ProductCatalogGroupViewByProductCatalogGroupIdsQuery
  • ProductDefinitionIdQuery
  • ProductsInCategoryQuery
  • ProductTreeViewQuery
  • ProductVariantTreeViewQuery
  • ProductViewByProductIdsQuery
  • ProductViewFromParentProductIdsQuery
  • ProductViewInCategoryQuery
  • RootCategoriesInCatalogQuery
  • SingleCategoryQuery
  • ProductCatalogGroupTargetCatalogGroupsQuery
  • ProductTargetProductsQuery
  • OrderStatusQuery

MarketingFoundation

  • CampaignItemTreeViewByCategoryIdsQuery
  • ActiveCampaignItemsQuery
  • AllApplyTargetsForCampaignItemQuery
  • AllAwardsForCampaignItemQuery
  • AllTargetsForCampaignItemQuery
  • AllVoucherCodesForVoucherTargetQuery

TransactionFoundation

  • DefinitionTreeViewByCategoryIdsQuery
  • SingleBasketQuery
  • SingleOrderQuery

SecurityFoundation

  • AllRolesQuery
Ucommerce Aps - Vestergade 58N, 4th. floor - 8000 Aarhus C - Denmark
Phone +45 61 799 997 - Email [email protected] Ucommerce logo