Showing posts with label distirbutionMap. Show all posts
Showing posts with label distirbutionMap. Show all posts

Wednesday, December 25, 2013

Webshere Commerce - Data Cache (Part 3) - wc-server.xml


Populating data in CacheIVL: <WCD>\schema\db2\wcs.cacheivl.trigger.sql will do the job of copulating cache table when ever there is a add,delete and update.

Configure wc-server.xml:
Ensure that you have the following element in wc-server.xml under instanceProperties element

<CrossTransactionCache
            clearCacheOnMaxInvalidationIdsPerTransaction="false"
            clearUserDataCacheOnLogoff="false" clearUserOnLogoff="true"
            commandCaching="default" defaultResultSizeThreshold="8"
            enabled="true" maxInactivityTime="86400"
            maxInvalidationIdsPerTransaction="100000"
            maxTimeToLive="172800" reduceInvalidationIds="false" reduceMemory="false">
            <WCSystemDistributedMapCache enabled="true"
                maxInactivityTime="86400" maxTimeToLive="172800" reduceMemory="false"/>
            <com.ibm.commerce.user.objsrc.OrganizationCache enabled="true"/>
            <com.ibm.commerce.taxation.objsrc.CountryCache enabled="true"/>
            <com.ibm.commerce.taxation.objsrc.StateProvinceCache enabled="true"/>
            <com.ibm.commerce.user.objsrc.MemberGroupCache enabled="true"/>
            <com.ibm.commerce.user.objsrc.RoleCache enabled="true"/>
            <com.ibm.commerce.fulfillment.objsrc.ShippingModeCache enabled="true"/>

            <com.ibm.commerce.fulfillment.objsrc.ShippingModeDescriptionCache enabled="true"/>
            <com.ibm.commerce.common.objsrc.StoreEntityDescriptionCache enabled="true"/>
            <com.ibm.commerce.common.objsrc.CurrencyCache enabled="true"/>
            <com.ibm.commerce.common.objsrc.CurrencyDescriptionCache enabled="true"/>
            <com.ibm.commerce.common.objsrc.LanguageCache enabled="true"/>
            <com.ibm.commerce.common.objsrc.LanguageDescriptionCache enabled="true"/>
            <com.ibm.commerce.catalog.objsrc.CatalogCache enabled="true"/>
            <com.ibm.commerce.catalog.objsrc.CatalogDescriptionCache enabled="true"/>
            <com.ibm.commerce.common.objsrc.SupportedLanguageCache enabled="true"/>
            <com.ibm.commerce.fulfillment.objsrc.FulfillmentCenterCache enabled="true"/>

            <com.ibm.commerce.attachment.beansrc.AttachmentRelationUsageCache enabled="true"/>

            <com.ibm.commerce.attachment.beansrc.AttachmentRelationUsageDescriptionCache enabled="true"/>

            <com.ibm.commerce.infrastructure.facade.server.commands.CreateAttachmentUsageConfigurationCmdImpl enabled="true"/>
            <com.ibm.commerce.user.beansrc.PolicyAccountCache enabled="true"/>
            <com.ibm.commerce.user.beansrc.PolicyAccountLockoutCache enabled="true"/>
            <com.ibm.commerce.user.beansrc.PolicyPasswordCache enabled="true"/>
            <WCSessionDistributedMapCache enabled="true"
                maxInactivityTime="900" maxTimeToLive="172800" reduceMemory="false"/>

            <com.ibm.commerce.component.contextservice.commands.ContextDataSerValueCacheCmdImpl enabled="true"/>
            <WCContractDistributedMapCache enabled="true"
                maxInactivityTime="86400" maxTimeToLive="172800" reduceMemory="false"/>
            <com.ibm.commerce.contract.beansrc.BusinessPolicyCache enabled="true"/>
            <com.ibm.commerce.contract.beansrc.PolicyDescriptionCache enabled="true"/>
            <WCPromotionDistributedMapCache enabled="true"
                maxInactivityTime="86400" maxTimeToLive="172800" reduceMemory="false"/>
            <com.ibm.commerce.fulfillment.objsrc.CalculationCodeCache enabled="true"/>

            <com.ibm.commerce.fulfillment.objsrc.CalculationCodeDescriptionCache enabled="true"/>

            <com.ibm.commerce.tools.epromotion.objimpl.CalculationCodePromotionCache enabled="true"/>

            <com.ibm.commerce.marketing.promotion.AbstractPromotionSessionBeanPersistenceManager enabled="true"/>

            <com.ibm.commerce.marketing.promotion.group.PromotionGroupSessionBeanPersistenceManager enabled="true"/>

            <com.ibm.commerce.marketing.promotion.policy.PromotionPolicySessionBeanPersistenceManager enabled="true"/>

            <com.ibm.commerce.marketing.promotion.runtime.ShopcartDrivenAgendaBuilder.SHOPCART enabled="true"/>

            <com.ibm.commerce.marketing.promotion.runtime.ShopcartDrivenAgendaBuilder enabled="true"/>
            <WCMarketingDistributedMapCache enabled="true"
                maxInactivityTime="86400" maxTimeToLive="172800" reduceMemory="false"/>

            <com.ibm.commerce.tools.campaigns.CampaignInitiativeEvaluateCmdImpl enabled="true"/>

            <com.ibm.commerce.marketing.commands.elements.DisplayMerchandisingAssociationActionTaskCmdImpl.MASSOCCECE enabled="true"/>

            <com.ibm.commerce.marketing.commands.elements.DisplayMerchandisingAssociationActionTaskCmdImpl enabled="true"/>
            <com.ibm.commerce.marketing.dialog.util.MarketingUtilCatalog enabled="true"/>
            <WCUserDistributedMapCache enabled="true"
                maxInactivityTime="900" maxTimeToLive="172800" reduceMemory="false"/>

            <com.ibm.commerce.membergroup.commands.ListMemberGroupsForUserCmdImpl enabled="true"/>
            <com.ibm.commerce.user.objsrc.DemographicsCache enabled="true"/>
            <com.ibm.commerce.dynacache.commands.MemberGroupsCache enabled="true"/>
            <com.ibm.commerce.user.objsrc.MemberGroupMemberCache enabled="true"/>
            <com.ibm.commerce.user.objsrc.MemberRelationshipsCache enabled="true"/>

            <com.ibm.commerce.user.beansrc.MemberRelationshipsExtendedCache enabled="true"/>
            <com.ibm.commerce.user.objsrc.MemberRoleCache enabled="true"/>
            <com.ibm.commerce.user.objsrc.MemberCache enabled="true"/>
            <com.ibm.commerce.user.objsrc.UserCache enabled="true"/>
            <com.ibm.commerce.user.objsrc.UserRegistryCache enabled="true"/>

            <com.ibm.commerce.accesscontrol.policymanager.CommandLevelAuthorizationCache enabled="true"/>

            <com.ibm.commerce.accesscontrol.policymanager.ParentOrganizationCache enabled="true"/>

            <com.ibm.commerce.marketing.promotion.runtime.PromotionArgumentSessionBeanPersistenceManager enabled="true"/>
            <WCCatalogGroupDistributedMapCache enabled="true"
                maxInactivityTime="86400" maxTimeToLive="172800" reduceMemory="false"/>
            <com.ibm.commerce.catalog.objsrc.CatalogGroupCache enabled="true"/>

            <com.ibm.commerce.catalog.objsrc.CatalogGroupDescriptionCache enabled="true"/>
            <com.ibm.commerce.catalog.beansrc.CatalogGroupRelationCache enabled="true"/>
            <WCCatalogEntryDistributedMapCache enabled="true"
                maxInactivityTime="86400" maxTimeToLive="172800" reduceMemory="false"/>

            <com.ibm.commerce.fulfillment.objsrc.CatalogEntryShippingCache enabled="true"/>
            <com.ibm.commerce.catalog.objsrc.CatalogEntryCache enabled="true"/>

            <com.ibm.commerce.catalog.objsrc.CatalogEntryDescriptionCache enabled="true"/>
            <com.ibm.commerce.catalog.objsrc.ItemCache enabled="true"/>
            <com.ibm.commerce.catalog.objsrc.ProductCache enabled="true"/>
            <com.ibm.commerce.catalog.util.CatalogHelperCache enabled="true"/>

            <com.ibm.commerce.catalog.beansrc.CatalogGroupCatalogEntryRelationCache enabled="true"/>
            <WCPriceDistributedMapCache enabled="true"
                maxInactivityTime="86400" maxTimeToLive="172800" reduceMemory="false"/>
            <com.ibm.commerce.catalog.beansrc.ListPriceCache enabled="true"/>
            <com.ibm.commerce.order.objsrc.OfferCache enabled="true"/>
            <com.ibm.commerce.order.objsrc.OfferPriceCache enabled="true"/>
            <com.ibm.commerce.price.commands.RetrievePricesCmdImpl enabled="true"/>
        </CrossTransactionCache>


After configuring distirbutedMap on server. You should see following logging statements in sysouts

ResourceMgrIm I   WSVR0049I: Binding WCUserDistributedMapCache as services/cache/WCUserDistributedMapCache
ResourceMgrIm I   WSVR0049I: Binding WCSessionDistributedMapCache as services/cache/WCSessionDistributedMapCache
ResourceMgrIm I   WSVR0049I: Binding WCCatalogEntryDistributedMapCache as services/cache/WCCatalogEntryDistributedMapCache
ResourceMgrIm I   WSVR0049I: Binding WCCatalogGroupDistributedMapCache as services/cache/WCCatalogGroupDistributedMapCache
 This means all the configured distirbutedMaps are active now.


This will ensure all the settings regarding the data cache is completed. Still i have to find if WC is considering cacheivl? is the invalidation schedule job provided by the IBM is working? why i ask this question is simple. Trigger ran twice for catalog table and there is double data in cacheivl. when i ran invalidation job. data was not removed from cacheivl. If any one know more on this please share.

Monday, December 23, 2013

Websphere Commerce Data Cache (Part 1) - Distribution Maps


 In Data Cache we have to know what distribution mapping has to be configured for caching.We cover how to configure in a while. Before configuring we need to know what are the distribution maps available.


WCContractDistributedMapCache, WCSystemDistributedMapCache

Cache any system data like Organization, Country, StateProvince,MemberGroup, Role, ShippingMode, Currency,Language, BusinessPolicy


WCPromotionDistributedMapCache, WCMarketingDistributedMapCache

These distribution maps will cache marketing and promotional data like CalculationCode, Promotion, PromotionGroup, PromotionPolicy, MerchandisingAssociation


WCCatalogGroupDistributedMapCache

This will cache catalog Group related data like CatalogGroup, CatalogGroupRelation


WCCatalogEntryDistributedMapCache, WCPriceDistributedMapCache

Catalog Entry related data will be cached for this distribution Map like Item, Product, Shipping, Price.


WCUserDistributedMapCache, WCSessionDistributedMapCache

User and session related data like user related and session related data


WCFlexFlowDistributedMapCache,WCSearchxxxDistributedMapCache,WCSEOxxxDistributedMapCache

Some Essential data.

Note: Command caching is enabled using cachespec.xml

How to configure distributedMap data cache on server? Click here

Reference: