Add a CacheItem to the cache.
Namespace: Alachisoft.NCache.Web.CachingAssembly: Alachisoft.NCache.Web (in Alachisoft.NCache.Web.dll) Version: 4.1.0.0 (4.1.0.0)
Syntax
C# |
---|
public CacheItemVersion Add( string key, CacheItem item, DSWriteOption dsWriteOption, string providerName, DataSourceItemsAddedCallback onDataSourceItemAdded ) |
Visual Basic |
---|
Public Function Add ( _ key As String, _ item As CacheItem, _ dsWriteOption As DSWriteOption, _ providerName As String, _ onDataSourceItemAdded As DataSourceItemsAddedCallback _ ) As CacheItemVersion |
Visual C++ |
---|
public: CacheItemVersion^ Add( String^ key, CacheItem^ item, DSWriteOption dsWriteOption, String^ providerName, DataSourceItemsAddedCallback^ onDataSourceItemAdded ) |
Parameters
- key
- Type: System..::..String
The cache key used to reference the item.
- item
- Type: Alachisoft.NCache.Web.Caching..::..CacheItem
The item that is to be stored.
- dsWriteOption
- Type: Alachisoft.NCache.Web.Caching..::..DSWriteOption
Options regarding updating data source
- providerName
- Type: System..::..String
A unique identifier for the data source
- onDataSourceItemAdded
- Type: Alachisoft.NCache.Web.Caching..::..DataSourceItemsAddedCallback
A delegate that, if provided, is called when item is added to data source