C# Class BB.Caching.Cache

Contains the core methods for caching data in memory, redis, or both.
Datei anzeigen Open project: JesseBuesking/BB.Caching

Public Methods

Method Description
LoadFromConfig ( ConfigurationSection section = null, bool establishConnections = true ) : List

Loads BB.Caching settings from you app config file, or from the section supplied.

Prepare ( ) : void

Calls any necessary preparation logic by the caching system. Before calling this, you need to either: 1. Programmatically set up your connections before calling this, manually adding connection groups by calling SharedCache.Instance.AddRedisConnectionGroup(...); 2. Call Cache.LoadFromConfig(...) to load your settings from a configuration file.

Method Details

LoadFromConfig() public static method

Loads BB.Caching settings from you app config file, or from the section supplied.
public static LoadFromConfig ( ConfigurationSection section = null, bool establishConnections = true ) : List
section System.Configuration.ConfigurationSection /// An optional to load configuration data from. If this is left as null, /// the method will try to load your configuration settings from the current projects app config file. ///
establishConnections bool /// Talks with the redis instances defined in the connection strings to establish connections. Testing classes /// will set this to false. ///
return List

Prepare() public static method

Calls any necessary preparation logic by the caching system. Before calling this, you need to either: 1. Programmatically set up your connections before calling this, manually adding connection groups by calling SharedCache.Instance.AddRedisConnectionGroup(...); 2. Call Cache.LoadFromConfig(...) to load your settings from a configuration file.
public static Prepare ( ) : void
return void