IObjectCacheTKey, TValueGetOrInsert Method
Gets and returns the object if it exists in the cache otherwise the supplied createMethod is used to
get the item from the repository
Namespace: Scanjour.Workflow4.Base.CacheAssembly: Scanjour.Workflow4.Base (in Scanjour.Workflow4.Base.dll) Version: 24.4.0.0 (24.4.0.0)
TValue GetOrInsert(
Uri uri,
TKey key,
Func<TKey, TValue> createMethod
)
Function GetOrInsert (
uri As Uri,
key As TKey,
createMethod As Func(Of TKey, TValue)
) As TValue
TValue GetOrInsert(
Uri^ uri,
TKey key,
Func<TKey, TValue>^ createMethod
)
abstract GetOrInsert :
uri : Uri *
key : 'TKey *
createMethod : Func<'TKey, 'TValue> -> 'TValue
- uri Uri
- uri identifing the database
- key TKey
- The key of the item to get
- createMethod FuncTKey, TValue
- Function that is able to create a cacheitem
TValueThe object identified by the key