Class CacheItemWrapper
Wrapper for items stored in the weak reference cache.
Inheritance
System.Object
CacheItemWrapper
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Framework.Cache
Assembly: EPiServer.Framework.dll
Version: 8.11.0Syntax
public class CacheItemWrapper
Remarks
Intended for internal use only - do not reference this class in your code.
Constructors
CacheItemWrapper(Object, CacheEvictionPolicy, DateTime)
Initializes a new instance of the CacheItemWrapper class.
Declaration
public CacheItemWrapper(object value, CacheEvictionPolicy eviction, DateTime now)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value | The value. |
CacheEvictionPolicy | eviction | The eviction policy. |
System.DateTime | now | The current time/date stamp. |
Methods
ReturnIfValid(DateTime)
Returns the object if it is valid (considering expiration and liveness of the weak reference).
Declaration
public object ReturnIfValid(DateTime now)
Parameters
Type | Name | Description |
---|---|---|
System.DateTime | now | The current time/date stamp. |
Returns
Type | Description |
---|---|
System.Object | The object if it is valid, otherwise null. |