CommerceCache Constructor

Initializes a new instance of the CommerceCache class.

Namespace:  Microsoft.CommerceServer.Runtime.Caching
Assembly:  Microsoft.CommerceServer.Runtime (in Microsoft.CommerceServer.Runtime.dll)

Syntax

'Declaration
Public Sub New ( _
    name As String, _
    refreshInterval As Integer, _
    retryInterval As Integer, _
    loaderProgID As String, _
    writerProgID As String, _
    cacheObjectProgID As String, _
    loaderConfigDictionary As Object, _
    writerConfigDictionary As Object, _
    debugContext As DebugContext _
)
'Usage
Dim name As String
Dim refreshInterval As Integer
Dim retryInterval As Integer
Dim loaderProgID As String
Dim writerProgID As String
Dim cacheObjectProgID As String
Dim loaderConfigDictionary As Object
Dim writerConfigDictionary As Object
Dim debugContext As DebugContext

Dim instance As New CommerceCache(name, refreshInterval, _
    retryInterval, loaderProgID, writerProgID, _
    cacheObjectProgID, loaderConfigDictionary, _
    writerConfigDictionary, debugContext)
public CommerceCache(
    string name,
    int refreshInterval,
    int retryInterval,
    string loaderProgID,
    string writerProgID,
    string cacheObjectProgID,
    Object loaderConfigDictionary,
    Object writerConfigDictionary,
    DebugContext debugContext
)
public:
CommerceCache(
    String^ name, 
    int refreshInterval, 
    int retryInterval, 
    String^ loaderProgID, 
    String^ writerProgID, 
    String^ cacheObjectProgID, 
    Object^ loaderConfigDictionary, 
    Object^ writerConfigDictionary, 
    DebugContext^ debugContext
)
public function CommerceCache(
    name : String, 
    refreshInterval : int, 
    retryInterval : int, 
    loaderProgID : String, 
    writerProgID : String, 
    cacheObjectProgID : String, 
    loaderConfigDictionary : Object, 
    writerConfigDictionary : Object, 
    debugContext : DebugContext
)

Parameters

  • name
    Type: System..::.String
    Cache name. May not be nullNothingnullptra null reference (Nothing in Visual Basic).
  • refreshInterval
    Type: System..::.Int32
    Refresh interval in seconds. A value of zero means to never refresh.
  • retryInterval
    Type: System..::.Int32
    Retry interval in seconds. A value of zero means to use the CacheManager default (60 seconds).
  • loaderProgID
    Type: System..::.String
    ProgId of the component that should be created and invoked to populate this cache during refresh cycles. May not be nullNothingnullptra null reference (Nothing in Visual Basic).
  • writerProgID
    Type: System..::.String
    ProgId of the component that should be created and invoked to write out cache data during refresh cycles. Optional. May be nullNothingnullptra null reference (Nothing in Visual Basic).
  • cacheObjectProgID
    Type: System..::.String
    ProgId of the component that is to serve as the cache container object. Usually Commerce.Dictionary or Commerce.LRUCache. May be nullNothingnullptra null reference (Nothing in Visual Basic).
  • loaderConfigDictionary
    Type: System..::.Object
    Commerce.IDictionary object containing name value pairs to pass to the loader component when it is invoked. Optional. May be nullNothingnullptra null reference (Nothing in Visual Basic).
  • writerConfigDictionary
    Type: System..::.Object
    Commerce.IDictionary object containing name value pairs to pass to the writer component when it is invoked. Optional. May be nullNothingnullptra null reference (Nothing in Visual Basic).

Exceptions

Exception Condition
ArgumentNullException

The name, loaderProgID, or debugContext arguments is nullNothingnullptra null reference (Nothing in Visual Basic).

Remarks

Use this method to create a new instance of the CommerceCache class. This constructor throws an ArgumentNullException if the name, loaderProgID, or dbgContext arguments are nullNothingnullptra null reference (Nothing in Visual Basic).

Permissions

See Also

Reference

CommerceCache Class

CommerceCache Members

Microsoft.CommerceServer.Runtime.Caching Namespace