• ServiceStack.Caching.ICachClient.cs


    ylbtech-ServiceStack.Caching.ICachClient.cs
    1.返回顶部
    1、
    #region 程序集 ServiceStack.Interfaces, Version=5.0.0.0, Culture=neutral, PublicKeyToken=02c12cbda47e6587
    // C:UsersAdministratorsource
    eposSolution4packagesServiceStack.Interfaces.5.8.0lib
    et45ServiceStack.Interfaces.dll
    #endregion
    
    using System;
    using System.Collections.Generic;
    
    namespace ServiceStack.Caching
    {
        //
        // 摘要:
        //     A common interface implementation that is implemented by most cache providers
        public interface ICacheClient : IDisposable
        {
            bool Add<T>(string key, T value, DateTime expiresAt);
            //
            // 摘要:
            //     Adds a new item into the cache at the specified cache key only if the cache is
            //     empty.
            //
            // 参数:
            //   key:
            //     The key used to reference the item.
            //
            //   value:
            //     The object to be inserted into the cache.
            //
            // 返回结果:
            //     true if the item was successfully stored in the cache; false otherwise.
            //
            // 备注:
            //     The item does not expire unless it is removed due memory pressure.
            bool Add<T>(string key, T value);
            bool Add<T>(string key, T value, TimeSpan expiresIn);
            //
            // 摘要:
            //     Increments the value of the specified key by the given amount. The operation
            //     is atomic and happens on the server. A non existent value at key starts at 0
            //
            // 参数:
            //   key:
            //     The identifier for the item to increment.
            //
            //   amount:
            //     The amount by which the client wants to decrease the item.
            //
            // 返回结果:
            //     The new value of the item or -1 if not found.
            //
            // 备注:
            //     The item must be inserted into the cache before it can be changed. The item must
            //     be inserted as a System.String. The operation only works with System.UInt32 values,
            //     so -1 always indicates that the item was not found.
            long Decrement(string key, uint amount);
            //
            // 摘要:
            //     Invalidates all data on the cache.
            void FlushAll();
            //
            // 摘要:
            //     Retrieves the specified item from the cache.
            //
            // 参数:
            //   key:
            //     The identifier for the item to retrieve.
            //
            // 类型参数:
            //   T:
            //
            // 返回结果:
            //     The retrieved item, or null if the key was not found.
            T Get<T>(string key);
            //
            // 摘要:
            //     Retrieves multiple items from the cache. The default value of T is set for all
            //     keys that do not exist.
            //
            // 参数:
            //   keys:
            //     The list of identifiers for the items to retrieve.
            //
            // 返回结果:
            //     a Dictionary holding all items indexed by their key.
            IDictionary<string, T> GetAll<T>(IEnumerable<string> keys);
            //
            // 摘要:
            //     Increments the value of the specified key by the given amount. The operation
            //     is atomic and happens on the server. A non existent value at key starts at 0
            //
            // 参数:
            //   key:
            //     The identifier for the item to increment.
            //
            //   amount:
            //     The amount by which the client wants to increase the item.
            //
            // 返回结果:
            //     The new value of the item or -1 if not found.
            //
            // 备注:
            //     The item must be inserted into the cache before it can be changed. The item must
            //     be inserted as a System.String. The operation only works with System.UInt32 values,
            //     so -1 always indicates that the item was not found.
            long Increment(string key, uint amount);
            //
            // 摘要:
            //     Removes the specified item from the cache.
            //
            // 参数:
            //   key:
            //     The identifier for the item to delete.
            //
            // 返回结果:
            //     true if the item was successfully removed from the cache; false otherwise.
            bool Remove(string key);
            //
            // 摘要:
            //     Removes the cache for all the keys provided.
            //
            // 参数:
            //   keys:
            //     The keys.
            void RemoveAll(IEnumerable<string> keys);
            bool Replace<T>(string key, T value, DateTime expiresAt);
            bool Replace<T>(string key, T value, TimeSpan expiresIn);
            //
            // 摘要:
            //     Replaces the item at the cachekey specified only if an items exists at the location
            //     already.
            bool Replace<T>(string key, T value);
            bool Set<T>(string key, T value, DateTime expiresAt);
            //
            // 摘要:
            //     Sets an item into the cache at the cache key specified regardless if it already
            //     exists or not.
            bool Set<T>(string key, T value);
            bool Set<T>(string key, T value, TimeSpan expiresIn);
            //
            // 摘要:
            //     Sets multiple items to the cache.
            //
            // 参数:
            //   values:
            //     The values.
            //
            // 类型参数:
            //   T:
            void SetAll<T>(IDictionary<string, T> values);
        }
    }
    2、
    2.返回顶部
     
    3.返回顶部
     
    4.返回顶部
     
    5.返回顶部
     
     
    6.返回顶部
     
    warn 作者:ylbtech
    出处:http://ylbtech.cnblogs.com/
    本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。
  • 相关阅读:
    install jprofiler for ubuntu
    android manifest相关属性
    install nginx for ubuntu
    Android shape
    mobile web for no cookie session
    Android布局属性
    什么是强类型,强类型集合
    radl (三) (转)
    几个.net 基础问题,自己回答了一些,请大家指教
    c#接口和抽象类的区别
  • 原文地址:https://www.cnblogs.com/storebook/p/12653124.html
Copyright © 2020-2023  润新知