Search Results for

    Show / Hide Table of Contents

    Class DataCacheRepository

    Repository for reading and writing from the cache

    Inheritance
    System.Object
    DataCacheRepository
    Implements
    IDataCacheRepository
    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.Data.Redis
    Assembly: Simplic.Cache.Data.Redis.dll
    Syntax
    public class DataCacheRepository : IDataCacheRepository

    Constructors

    | Improve this Doc View Source

    DataCacheRepository(IKeyValueStore)

    Initialize repository

    Declaration
    public DataCacheRepository(IKeyValueStore keyValueStore)
    Parameters
    Type Name Description
    IKeyValueStore keyValueStore

    Key value store

    Methods

    | Improve this Doc View Source

    Get<T>(String, String, String)

    Read data from the cache

    Declaration
    public async Task<T> Get<T>(string type, string keyName, string key)
    Parameters
    Type Name Description
    System.String type

    Data cache type

    System.String keyName

    Key name of the object

    System.String key

    Key value

    Returns
    Type Description
    System.Threading.Tasks.Task<T>

    Cachned object if exists

    Type Parameters
    Name Description
    T

    Data type

    | Improve this Doc View Source

    Remove(String, String, String)

    Remove object from cache

    Declaration
    public async Task Remove(string type, string keyName, string key)
    Parameters
    Type Name Description
    System.String type

    Data cache type

    System.String keyName

    Key name of the object

    System.String key

    Key value

    Returns
    Type Description
    System.Threading.Tasks.Task
    | Improve this Doc View Source

    Set<T>(String, String, String, T)

    Write data to the cache

    Declaration
    public async Task Set<T>(string type, string keyName, string key, T obj)
    Parameters
    Type Name Description
    System.String type

    Data cache type

    System.String keyName

    Key name of the object

    System.String key

    Key value

    T obj

    Object to cache

    Returns
    Type Description
    System.Threading.Tasks.Task
    Type Parameters
    Name Description
    T

    Data type

    Implements

    IDataCacheRepository
    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2018 SIMPLIC GmbH
    Generated by DocFx