Share via


OPP Caching for Solution Sites

The Solution Sites use several pipeline components that require specific caches. The Solution Sites provide two caches for tax and shipping that are used by the Order Processing pipeline. Site developers do not need to reference these caches. Unlike the catalog caches, these caches use Dictionary objects, so they are initialized in a slightly different way.

SampleRegionalTaxCache Cache

Shipping Method Router Cache

SampleRegionalTaxCache Cache

Initialization

The following code, from the InitCacheManager function, shows the creation of the SampleRegionalTaxCache cache:

'Create the configuration dictionary.
    Set dictTransactionConfig = GetDictionary()
    dictTransactionConfig("ConnectionString") = _
        dictConfig.s_TransactionConfigConnectionString

    ' Configure CacheManager for tax.
    oCacheManager.RefreshInterval("SampleRegionalTaxCache") = 0
    oCacheManager.RetryInterval("SampleRegionalTaxCache") = 60
    oCacheManager.LoaderProgId("SampleRegionalTaxCache") = _
        "Commerce.SampleRegionalTaxCache"
    Set oCacheManager.LoaderConfig("SampleRegionalTaxCache") = _
        dictTransactionConfig
    

The initialization code calls the GetCache method on the tax cache to ensure that Commerce Server Business Desk is informed that this application is caching tax information.

    Call oCacheManager.GetCache("SampleRegionalTaxCache")

Shipping Method Router Cache

The Shipping Method Router pipeline component requires a cache named ShippingManagerCache.

Initialization

The following code, from the InitCacheManager function, shows the creation of the cache ShippingManagerCache:

'Create the configuration dictionary.
    Set dictTransactionConfig = GetDictionary()
    dictTransactionConfig("ConnectionString") = _
        dictConfig.s_TransactionConfigConnectionString

    ' Configure CacheManager for shipping.
    oCacheManager.RefreshInterval("ShippingManagerCache") = 0
    oCacheManager.RetryInterval("ShippingManagerCache") = 60
    oCacheManager.LoaderProgId("ShippingManagerCache") = "Commerce.ShippingManagerCache"
    Set oCacheManager.LoaderConfig("ShippingManagerCache") = dictTransactionConfig
    
    ' Call GetCache() on the shipping cache to ensure that Business Desk
    ' is informed that this application is caching shipping information.
    Call oCacheManager.GetCache("ShippingManagerCache")

See Also

Shipping Objects

Tax Objects

Copyright © 2005 Microsoft Corporation.
All rights reserved.