DataCache.ResetObjectTimeout Method (String, TimeSpan)
Resets the object timeout value, defining how long objects reside in the cache before expiring. The value specified for the object overrides the default settings for the cache.
Namespace: Microsoft.ApplicationServer.Caching
Assembly: Microsoft.ApplicationServer.Caching.Client (in Microsoft.ApplicationServer.Caching.Client.dll)
Syntax
public void ResetObjectTimeout(
string key,
TimeSpan newTimeout
)
public:
void ResetObjectTimeout(
String^ key,
TimeSpan newTimeout
)
member ResetObjectTimeout :
key:string *
newTimeout:TimeSpan -> unit
Public Sub ResetObjectTimeout (
key As String,
newTimeout As TimeSpan
)
Parameters
key
Type: System.StringThe unique value that is used to identify the object in the region.
newTimeout
Type: System.TimeSpanThe amount of time that the object should reside in the cache before expiration.
Remarks
Unless explicitly specified at the time the object was added to the cache, the timeout value specified in the named cache configuration is used. This method allows you to re-start the clock for the object expiration.
See Also
ResetObjectTimeout Overload
DataCache Class
Microsoft.ApplicationServer.Caching Namespace
Return to top