Search Results for

    Show / Hide Table of Contents

    Class CacheManager

    Manages cache objects

    Inheritance
    System.Object
    CacheManager
    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: Simplic.Cache
    Assembly: Simplic.CoreLib.dll
    Syntax
    public class CacheManager

    Properties

    | Improve this Doc View Source

    EnableCaching

    Caching

    Declaration
    public bool EnableCaching { get; set; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    Singleton

    Declaration
    public static CacheManager Singleton { get; }
    Property Value
    Type Description
    CacheManager

    Methods

    | Improve this Doc View Source

    AddObject(ICacheable)

    Fügt ein neues Objekt in den Cache ein

    Declaration
    public void AddObject(ICacheable Cacheable)
    Parameters
    Type Name Description
    ICacheable Cacheable

    If set to true, the object will be ignored if it already exists

    | Improve this Doc View Source

    AddObject(ICacheable, Boolean)

    Fügt ein neues Objekt in den Cache ein

    Declaration
    public void AddObject(ICacheable Cacheable, bool ignoreIfExists = true)
    Parameters
    Type Name Description
    ICacheable Cacheable

    If set to true, the object will be ignored if it already exists

    System.Boolean ignoreIfExists

    If set to true, existing objects will be ignored

    | Improve this Doc View Source

    AddWeakReferenceObject<T>(T, Boolean)

    Stores the object as a weak reference in the cache

    Declaration
    public void AddWeakReferenceObject<T>(T cacheable, bool ignoreIfExists = true)
        where T : ICacheable
    Parameters
    Type Name Description
    T cacheable

    Object to cache

    System.Boolean ignoreIfExists

    If set to true, existing objects will be ignored

    Type Parameters
    Name Description
    T

    Type of object to stre

    | Improve this Doc View Source

    ClearCache()

    Clears the whole cache

    Declaration
    public void ClearCache()
    | Improve this Doc View Source

    ClearCache(String)

    Clears the cache and sends cache clear of the specified type

    Declaration
    public void ClearCache(string type)
    Parameters
    Type Name Description
    System.String type
    | Improve this Doc View Source

    GenericCacheItemNoException<T>()

    Returns the instance of a generic type just by passing its content type. The type of the data will be used for getting the item

    Declaration
    public GenericCacheItem<T> GenericCacheItemNoException<T>()
    Returns
    Type Description
    GenericCacheItem<T>
    Type Parameters
    Name Description
    T

    Type

    | Improve this Doc View Source

    GetObject<T>(String)

    Holt ein Objekt aus dem Cache und gibt es zurück

    Declaration
    public T GetObject<T>(string Key)
        where T : ICacheable
    Parameters
    Type Name Description
    System.String Key

    Eindeutiger schlüssel, anhand dessen das Objekt identifiziert wird

    Returns
    Type Description
    T

    Instanz eines Cache-Objekts

    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    GetObjectNoException<T>(String)

    Holt ein Objekt aus dem Cache und gibt es zurück und wirft keine Exception falls das Objekt nicht gefunden werden konnte

    Declaration
    public T GetObjectNoException<T>(string Key)
        where T : ICacheable
    Parameters
    Type Name Description
    System.String Key

    Eindeutiger schlüssel, anhand dessen das Objekt identifiziert wird

    Returns
    Type Description
    T

    Instanz eines Cache-Objekts

    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    PrepareKey(String)

    Prepare a key

    Declaration
    public static string PrepareKey(string key)
    Parameters
    Type Name Description
    System.String key
    Returns
    Type Description
    System.String
    | Improve this Doc View Source

    RemoveObject<T>(String)

    Entfernt ein Cache-Objekt aus dem speicher

    Declaration
    public void RemoveObject<T>(string Key)
    Parameters
    Type Name Description
    System.String Key

    Eindeutiger Schlüssel, anhand dessen das Objekt identifiziert wird

    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    RemoveObjectNoException<T>(String)

    Entfernt ein Cache-Objekt aus dem speicher

    Declaration
    public void RemoveObjectNoException<T>(string Key)
    Parameters
    Type Name Description
    System.String Key

    Eindeutiger Schlüssel, anhand dessen das Objekt identifiziert wird

    Type Parameters
    Name Description
    T

    Events

    | Improve this Doc View Source

    CacheCleared

    Cache clear event

    Declaration
    public event CacheClearedEventHandler CacheCleared
    Event Type
    Type Description
    CacheClearedEventHandler
    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2018 SIMPLIC GmbH
    Generated by DocFx