Insert a value to the cache

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

Syntax

C#
public virtual CacheItemVersion Insert(
	string key,
	Object value,
	string group,
	string subGroup
)
Visual Basic
Public Overridable Function Insert ( 
	key As String,
	value As Object,
	group As String,
	subGroup As String
) As CacheItemVersion
Visual C++
public:
virtual 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

Return Value

Type: CacheItemVersion

Examples

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

See Also