Retrieves the object from the cache for the given keys as key value pairs
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 override IDictionary GetBulk( string[] keys, string providerName, DSReadOption dsReadOption ) |
Visual Basic |
---|
Public Overrides Function GetBulk ( _ keys As String(), _ providerName As String, _ dsReadOption As DSReadOption _ ) As IDictionary |
Visual C++ |
---|
public: virtual IDictionary^ GetBulk( array<String^>^ keys, String^ providerName, DSReadOption dsReadOption ) override |
Parameters
- keys
- Type: array<System..::..String>[]()[][]
The keys against which items are to be fetched.
- providerName
- Type: System..::..String
A unique identifier for the data source
- dsReadOption
- Type: Alachisoft.NCache.Web.Caching..::..DSReadOption
Options regarding reading from data source
Return Value
The retrieved cache items.Remarks
Note: If exceptions are enabled through the ExceptionsEnabled setting, this property throws exception incase of failure.
Examples
The following example demonstrates how to retrieve the value cached for an ASP.NET text
box server control.
Or simply in a class deriving from [!:Alachisoft.NCache.Web.UI.NPage] or [!:Alachisoft.NCache.Web.UI.NUserControl].
CopyC#
NCache.Cache.Get(keys);
CopyC#
Cache.Get(keys,DSReadOption.ReadThru);
Exceptions
Exception | Condition |
---|---|
System..::..ArgumentNullException | keys contains a null reference (Nothing in Visual Basic). |
System..::..ArgumentException | keys is not serializable. |