ICacheTable TKey  Put Method NFX Class Library

[This is preliminary documentation and is subject to change.]

Puts an object identified by a key into cache returning the result of the put. For example, put may have added nothing if the table is capped and the space is occupied with data of higher priority

Namespace: NFX.ApplicationModel.Pile
Assembly: NFX (in NFX.dll) Version: 3.0.0.1 (3.0.0.1)
Syntax

PutResult Put(
	TKey key,
	Object obj,
	Nullable<int> maxAgeSec = null,
	int priority = 0,
	Nullable<DateTime> absoluteExpirationUTC = null
)

Parameters

key
Type: TKey
A table-wide unique obvject key
obj
Type: OnlineSystem Object
An object to put
maxAgeSec (Optional)
Type: OnlineSystem Nullable OnlineInt32 
If null then the default maxAgeSec is taken from Options property, otherwise specifies the length of items life in seconds
priority (Optional)
Type: OnlineSystem Int32
The priority of this item. If there is no space in future the items with lower priorities will not evict existing data with highr priorities
absoluteExpirationUTC (Optional)
Type: OnlineSystem Nullable OnlineDateTime 
Optional UTC timestamp of object eviction from cache

Return Value

Type: PutResult
The status of put - whether item was inserted/replaced(if key exists)/overwritten or collided with higher-prioritized existing data
See Also