Class DataCache
Represents data cache storage.
Inheritance
System.Object
DataCache
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
Assembly: Mediachase.BusinessFoundation.dll
Version: 12.17.2Syntax
public static class DataCache
Fields
EmptyUser
Declaration
public const string EmptyUser = ""
Field Value
Type | Description |
---|---|
System.String |
GlobalCategory
Declaration
public const string GlobalCategory = "Global"
Field Value
Type | Description |
---|---|
System.String |
Methods
Add(String, IEnumerable<FileDescriptor>, String, String, Object)
Adds the specified value to cache.
Declaration
public static void Add(string category, IEnumerable<FileDescriptor> fileDiscriptors, string userId, string key, object value)
Parameters
Type | Name | Description |
---|---|---|
System.String | category | The category. |
System.Collections.Generic.IEnumerable<FileDescriptor> | fileDiscriptors | The file descriptors. |
System.String | userId | The user id. |
System.String | key | The key. |
System.Object | value | The value. |
Add(String, Object)
Adds the specified value to cache.
Declaration
public static void Add(string key, object value)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key. |
System.Object | value | The value. |
GetValue(String)
Gets the value.
Declaration
public static object GetValue(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key. |
Returns
Type | Description |
---|---|
System.Object |
GetValue(String, String, String)
Gets the value.
Declaration
public static object GetValue(string category, string userId, string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | category | The category. |
System.String | userId | The user id. |
System.String | key | The key. |
Returns
Type | Description |
---|---|
System.Object |
Remove(String, String, String)
Removes the specified category.
Declaration
public static void Remove(string category, string userId, string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | category | The category. |
System.String | userId | The user id. |
System.String | key | The key. |
RemoveAll()
Removes all.
Declaration
public static void RemoveAll()
RemoveByCategory(String)
Removes the specified category.
Declaration
public static void RemoveByCategory(string category)
Parameters
Type | Name | Description |
---|---|---|
System.String | category | The category. |
RemoveByUser(String)
Removes the specified user id.
Declaration
public static void RemoveByUser(string userId)
Parameters
Type | Name | Description |
---|---|---|
System.String | userId | The user id. |
TryGetValue<T>(String, out T)
Tries the get value.
Declaration
public static bool TryGetValue<T>(string key, out T value)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key. |
T | value | The value. |
Returns
Type | Description |
---|---|
System.Boolean |
Type Parameters
Name | Description |
---|---|
T |
TryGetValue<T>(String, String, out T)
Tries the get value.
Declaration
public static bool TryGetValue<T>(string category, string key, out T value)
Parameters
Type | Name | Description |
---|---|---|
System.String | category | The category. |
System.String | key | The key. |
T | value | The value. |
Returns
Type | Description |
---|---|
System.Boolean |
Type Parameters
Name | Description |
---|---|
T |
TryGetValue<T>(String, String, String, out T)
Tries the get value.
Declaration
public static bool TryGetValue<T>(string category, string userId, string key, out T value)
Parameters
Type | Name | Description |
---|---|---|
System.String | category | The category. |
System.String | userId | The user id. |
System.String | key | The key. |
T | value | The value. |
Returns
Type | Description |
---|---|
System.Boolean |
Type Parameters
Name | Description |
---|---|
T |