首页 > 其他 > 详细

ServiceStack.Caching.ICachClient.cs

时间:2020-04-07 14:24:16      阅读:79      评论:0      收藏:0      [点我收藏+]
ylbtech-ServiceStack.Caching.ICachClient.cs

 

1.返回顶部
1、
#region 程序集 ServiceStack.Interfaces, Version=5.0.0.0, Culture=neutral, PublicKeyToken=02c12cbda47e6587
// C:\Users\Administrator\source\repos\Solution4\packages\ServiceStack.Interfaces.5.8.0\lib\net45\ServiceStack.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.返回顶部
 
技术分享图片 作者:ylbtech
出处:http://ylbtech.cnblogs.com/
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。

ServiceStack.Caching.ICachClient.cs

原文:https://www.cnblogs.com/storebook/p/12653124.html

(1)
(1)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!