Craig's Utility Library  4.0 Beta
Utilities.DataTypes.Caching.Default.Cache Class Reference

Built in cache More...

Inheritance diagram for Utilities.DataTypes.Caching.Default.Cache:
Utilities.DataTypes.Caching.BaseClasses.CacheBase Utilities.DataTypes.Patterns.BaseClasses.SafeDisposableBaseClass Utilities.DataTypes.Caching.Interfaces.ICache

Public Member Functions

 Cache ()
 Constructor More...
 
override void Add (string key, object value)
 Add item to the cache More...
 
override void Clear ()
 Clears the cache More...
 
override bool Contains (KeyValuePair< string, object > item)
 Determines if the item is in the cache More...
 
override bool ContainsKey (string key)
 Checks if the cache contains the key More...
 
override void CopyTo (KeyValuePair< string, object >[] array, int arrayIndex)
 Copies to an array More...
 
override IEnumerator< KeyValuePair< string, object > > GetEnumerator ()
 Gets the enumerator More...
 
override bool Remove (string key)
 Removes an item from the cache More...
 
override bool Remove (KeyValuePair< string, object > item)
 Removes an item from an array More...
 
override bool TryGetValue (string key, out object value)
 Attempt to get a value More...
 
- Public Member Functions inherited from Utilities.DataTypes.Caching.BaseClasses.CacheBase
void Add (KeyValuePair< string, object > item)
 Adds an item to the cache More...
 
void Add (string Key, object Value, IEnumerable< string > Tags)
 Adds a value/key combination and assigns tags to it More...
 
IEnumerable< object > GetByTag (string Tag)
 Gets the objects associated with a specific tag More...
 
void RemoveByTag (string Tag)
 Removes all items associated with the tag specified More...
 
- Public Member Functions inherited from Utilities.DataTypes.Patterns.BaseClasses.SafeDisposableBaseClass
void Dispose ()
 Dispose function More...
 

Protected Member Functions

override void Dispose (bool Managed)
 Disposes the cache More...
 
- Protected Member Functions inherited from Utilities.DataTypes.Caching.BaseClasses.CacheBase
 CacheBase ()
 Constructor More...
 
- Protected Member Functions inherited from Utilities.DataTypes.Patterns.BaseClasses.SafeDisposableBaseClass
 SafeDisposableBaseClass ()
 Construct More...
 

Properties

override int Count [get]
 The number of items in the cache More...
 
override ICollection< string > Keys [get]
 Keys More...
 
override string Name [get]
 Name More...
 
override ICollection< object > Values [get]
 Values More...
 
ConcurrentDictionary< string, object > InternalCache [get]
 Internal cache More...
 
- Properties inherited from Utilities.DataTypes.Caching.BaseClasses.CacheBase
abstract int Count [get]
 The number of items in the cache More...
 
bool IsReadOnly [get]
 Read only More...
 
abstract ICollection< string > Keys [get]
 Keys More...
 
abstract string Name [get]
 Name More...
 
IEnumerable< string > Tags [get]
 The tags used thus far More...
 
abstract ICollection< object > Values [get]
 Values More...
 
ListMapping< string, string > TagMappings [get]
 Tag mappings More...
 
object this[string key] [get, set]
 Indexer More...
 
- Properties inherited from Utilities.DataTypes.Caching.Interfaces.ICache
string Name [get]
 Cache name More...
 
IEnumerable< string > Tags [get]
 The tags used thus far More...
 

Detailed Description

Built in cache

Definition at line 33 of file Cache.cs.

Constructor & Destructor Documentation

Utilities.DataTypes.Caching.Default.Cache.Cache ( )

Constructor

Definition at line 38 of file Cache.cs.

Member Function Documentation

override void Utilities.DataTypes.Caching.Default.Cache.Add ( string  key,
object  value 
)
virtual

Add item to the cache

Parameters
keyKey of the item
valueValue to add

Implements Utilities.DataTypes.Caching.BaseClasses.CacheBase.

Definition at line 73 of file Cache.cs.

override void Utilities.DataTypes.Caching.Default.Cache.Clear ( )
virtual

Clears the cache

Implements Utilities.DataTypes.Caching.BaseClasses.CacheBase.

Definition at line 81 of file Cache.cs.

override bool Utilities.DataTypes.Caching.Default.Cache.Contains ( KeyValuePair< string, object >  item)
virtual

Determines if the item is in the cache

Parameters
itemitem to check for
Returns

Implements Utilities.DataTypes.Caching.BaseClasses.CacheBase.

Definition at line 91 of file Cache.cs.

override bool Utilities.DataTypes.Caching.Default.Cache.ContainsKey ( string  key)
virtual

Checks if the cache contains the key

Parameters
keyKey to check
Returns
True if it is there, false otherwise

Implements Utilities.DataTypes.Caching.BaseClasses.CacheBase.

Definition at line 101 of file Cache.cs.

override void Utilities.DataTypes.Caching.Default.Cache.CopyTo ( KeyValuePair< string, object >[]  array,
int  arrayIndex 
)
virtual

Copies to an array

Parameters
arrayArray to copy to
arrayIndexIndex to start at

Implements Utilities.DataTypes.Caching.BaseClasses.CacheBase.

Definition at line 111 of file Cache.cs.

override void Utilities.DataTypes.Caching.Default.Cache.Dispose ( bool  Managed)
protectedvirtual

Disposes the cache

Parameters
ManagedManaged objects or just unmanaged

Implements Utilities.DataTypes.Patterns.BaseClasses.SafeDisposableBaseClass.

Definition at line 162 of file Cache.cs.

override IEnumerator<KeyValuePair<string, object> > Utilities.DataTypes.Caching.Default.Cache.GetEnumerator ( )
virtual

Gets the enumerator

Returns
The enumerator

Implements Utilities.DataTypes.Caching.BaseClasses.CacheBase.

Definition at line 120 of file Cache.cs.

override bool Utilities.DataTypes.Caching.Default.Cache.Remove ( string  key)
virtual

Removes an item from the cache

Parameters
keykey to remove
Returns
True if it is removed, false otherwise

Implements Utilities.DataTypes.Caching.BaseClasses.CacheBase.

Definition at line 130 of file Cache.cs.

override bool Utilities.DataTypes.Caching.Default.Cache.Remove ( KeyValuePair< string, object >  item)
virtual

Removes an item from an array

Parameters
itemItem to remove
Returns
True if it is removed, false otherwise

Implements Utilities.DataTypes.Caching.BaseClasses.CacheBase.

Definition at line 141 of file Cache.cs.

override bool Utilities.DataTypes.Caching.Default.Cache.TryGetValue ( string  key,
out object  value 
)
virtual

Attempt to get a value

Parameters
keyKey to get
valueValue of the item
Returns
True if it is found, false otherwise

Implements Utilities.DataTypes.Caching.BaseClasses.CacheBase.

Definition at line 153 of file Cache.cs.

Property Documentation

override int Utilities.DataTypes.Caching.Default.Cache.Count
get

The number of items in the cache

Definition at line 46 of file Cache.cs.

ConcurrentDictionary<string, object> Utilities.DataTypes.Caching.Default.Cache.InternalCache
getprotected

Internal cache

Definition at line 66 of file Cache.cs.

override ICollection<string> Utilities.DataTypes.Caching.Default.Cache.Keys
get

Keys

Definition at line 51 of file Cache.cs.

override string Utilities.DataTypes.Caching.Default.Cache.Name
get

Name

Definition at line 56 of file Cache.cs.

override ICollection<object> Utilities.DataTypes.Caching.Default.Cache.Values
get

Values

Definition at line 61 of file Cache.cs.


The documentation for this class was generated from the following file: