Click or drag to resize

SimpleFileCacheJsonGetT Method

Attempts to get an object from the cache if it is not older than a specified expiry time in minutes.

Namespace: Orthogonal.Common.Basic
Assembly: Orthogonal.Common.Basic (in Orthogonal.Common.Basic.dll) Version: 2024-04-15 18:00 GMT+10.f27da1471008deaf16b803c17e24a5955690aef1
Syntax
C#
public static T Get<T>(
	string key,
	int expireMinutes
)
where T : class

Parameters

key  String
The unique key that identifies an object in the cache.
expireMinutes  Int32
The expiry minutes of the cached object. If the object has been in the cache for longer than the specified number of minutes then it is considered expired and will not be retrieved.

Type Parameters

T
The type of object to be retrieved from the cache.

Return Value

T
A object of type T if it exists in the cache with the specified key and it was not cached more than expireMinutes minutes ago.
See Also