Class CacheItemWrapper
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. 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.Internal
Assembly: EPiServer.Framework.dll
Version: 11.20.7Syntax
public class CacheItemWrapper
Constructors
CacheItemWrapper(Object, CacheEvictionPolicy, DateTime)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. 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)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. 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. |