Insert a value to the cache

Namespace: Alachisoft.NCache.Web.Caching
Assembly: Alachisoft.NCache.Web (in Alachisoft.NCache.Web.dll) Version: 4.1.0.0 (4.1.0.0)

Syntax

C#
public CacheItemVersion Insert(
	string key,
	Object value,
	string group,
	string subGroup
)
Visual Basic
Public Function Insert ( _
	key As String, _
	value As Object, _
	group As String, _
	subGroup As String _
) As CacheItemVersion
Visual C++
public:
CacheItemVersion^ Insert(
	String^ key, 
	Object^ value, 
	String^ group, 
	String^ subGroup
)

Parameters

key
Type: System..::..String
The cache key used to reference the item.
value
Type: System..::..Object
The value that is to be stored
group
Type: System..::..String
The data group of the item
subGroup
Type: System..::..String
The data group of the item

Examples

CopyC#
Cache cache = NCache.InitializeCache("myCache");
cache.Insert("DSN", value, "CONNECTIONS", null);

See Also