C# Class NetMud.DataAccess.Cache.PlayerDataCache

Storage and access for characters only, different than normal cache as it is on-demand load as opposed to front-loaded on start
Mostrar archivo Open project: SwiftAusterity/NetMud

Public Methods

Method Description
Add ( ICharacter objectToCache ) : void

Adds a single entity into the cache

Exists ( PlayerDataCacheKey key ) : bool

Checks if an entity is in the cache

Get ( PlayerDataCacheKey key ) : ICharacter

Gets one entity from the cache by its key

GetAll ( ) : IEnumerable

Only for the hotbackup procedure

GetAllForAccountHandle ( string accountHandle ) : IEnumerable

Get all entities of a type from the cache

Remove ( PlayerDataCacheKey key ) : void

Removes an entity from the cache by its key

Private Methods

Method Description
EnsureAccountCharacters ( string accountHandle ) : IEnumerable

Method Details

Add() public static method

Adds a single entity into the cache
public static Add ( ICharacter objectToCache ) : void
objectToCache ICharacter the entity to cache
return void

Exists() public static method

Checks if an entity is in the cache
public static Exists ( PlayerDataCacheKey key ) : bool
key PlayerDataCacheKey the key of the entity
return bool

Get() public static method

Gets one entity from the cache by its key
public static Get ( PlayerDataCacheKey key ) : ICharacter
key PlayerDataCacheKey the key it was cached with
return ICharacter

GetAll() public static method

Only for the hotbackup procedure
public static GetAll ( ) : IEnumerable
return IEnumerable

GetAllForAccountHandle() public static method

Get all entities of a type from the cache
public static GetAllForAccountHandle ( string accountHandle ) : IEnumerable
accountHandle string
return IEnumerable

Remove() public static method

Removes an entity from the cache by its key
public static Remove ( PlayerDataCacheKey key ) : void
key PlayerDataCacheKey the key of the entity to remove
return void