SaaS CMS has officially launched! Learn more now.

Class DataContextCache

Represents Data Context Cache.

Inheritance
System.Object
DataContextCache
Implements
System.Collections.IEnumerable
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: Mediachase.BusinessFoundation.Data
Assembly: Mediachase.BusinessFoundation.Data.dll
Version: 11.8.3
Syntax
public class DataContextCache : IEnumerable

Constructors

DataContextCache()

Initializes a new instance of the DataContextCache class.

Declaration
public DataContextCache()

Fields

NoAbsoluteExpiration

Declaration
public static readonly DateTime NoAbsoluteExpiration
Field Value
Type Description
System.DateTime

Properties

Count

Gets the count.

Declaration
public int Count { get; }
Property Value
Type Description
System.Int32

The count.

Item[String]

Gets or sets the System.Object with the specified key.

Declaration
public object this[string key] { get; set; }
Parameters
Type Name Description
System.String key
Property Value
Type Description
System.Object

Methods

Add(String, Object)

Adds the specified key.

Declaration
public object Add(string key, object value)
Parameters
Type Name Description
System.String key

The key.

System.Object value

The value.

Returns
Type Description
System.Object

Add(String, Object, DateTime)

Adds the specified key.

Declaration
public object Add(string key, object value, DateTime absoluteExpiration)
Parameters
Type Name Description
System.String key

The key.

System.Object value

The value.

System.DateTime absoluteExpiration

The absolute expiration.

Returns
Type Description
System.Object

Get(String)

Gets the specified key.

Declaration
public object Get(string key)
Parameters
Type Name Description
System.String key

The key.

Returns
Type Description
System.Object

GetEnumerator()

Returns an enumerator that iterates through a collection.

Declaration
public IEnumerator GetEnumerator()
Returns
Type Description
System.Collections.IEnumerator

An System.Collections.IEnumerator object that can be used to iterate through the collection.

Insert(String, Object)

Inserts the specified key.

Declaration
public void Insert(string key, object value)
Parameters
Type Name Description
System.String key

The key.

System.Object value

The value.

Insert(String, Object, DateTime)

Inserts the specified key.

Declaration
public void Insert(string key, object value, DateTime absoluteExpiration)
Parameters
Type Name Description
System.String key

The key.

System.Object value

The value.

System.DateTime absoluteExpiration

The absolute expiration.

Remove(String)

Removes the specified key.

Declaration
public object Remove(string key)
Parameters
Type Name Description
System.String key

The key.

Returns
Type Description
System.Object

RemoveExpired()

Removes the expired.

Declaration
public void RemoveExpired()

Implements

System.Collections.IEnumerable