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)
Usage
'Usage
Dim instance As DataCache
Dim key As String
Dim newTimeout As TimeSpan
instance.ResetObjectTimeout(key, newTimeout)
Syntax
'Declaration
Public Sub ResetObjectTimeout ( _
key As String, _
newTimeout As TimeSpan _
)
public void ResetObjectTimeout (
string key,
TimeSpan newTimeout
)
public:
void ResetObjectTimeout (
String^ key,
TimeSpan newTimeout
)
public void ResetObjectTimeout (
String key,
TimeSpan newTimeout
)
public function ResetObjectTimeout (
key : String,
newTimeout : TimeSpan
)
Parameters
- key
The unique value that is used to identify the object in the region.
- newTimeout
The 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. For more information, see Expiration and Eviction.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Platforms
Development Platforms
Visual Studio 2010 and later, .NET Framework 4
Target Platforms
Windows 7; Windows Server 2008 R2; Windows Server 2008 Service Pack 2; Windows Vista Service Pack 2
See Also
Reference
DataCache Class
DataCache Members
Microsoft.ApplicationServer.Caching Namespace
ff425062(v=azure.10).md 2011-08-26