You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
1.1 KiB
43 lines
1.1 KiB
9 months ago
|
using System;
|
||
|
using System.Collections.Generic;
|
||
|
using System.Linq;
|
||
|
using System.Text;
|
||
|
|
||
|
namespace RoadFlow.Cache.Interface
|
||
|
{
|
||
|
public interface ICache
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// 插入缓存
|
||
|
/// </summary>
|
||
|
/// <param name="key"></param>
|
||
|
/// <param name="obj"></param>
|
||
|
/// <returns></returns>
|
||
|
bool Insert(string key, object obj);
|
||
|
/// <summary>
|
||
|
/// 插入缓存
|
||
|
/// </summary>
|
||
|
/// <param name="key"></param>
|
||
|
/// <param name="obj"></param>
|
||
|
/// <returns></returns>
|
||
|
bool Insert(string key, object obj, DateTime expiry);
|
||
|
/// <summary>
|
||
|
/// 获取缓存
|
||
|
/// </summary>
|
||
|
/// <param name="key"></param>
|
||
|
/// <returns></returns>
|
||
|
object Get(string key);
|
||
|
/// <summary>
|
||
|
/// 移出缓存
|
||
|
/// </summary>
|
||
|
/// <param name="key"></param>
|
||
|
bool Remove(string key);
|
||
|
/// <summary>
|
||
|
/// 移出所有缓存
|
||
|
/// </summary>
|
||
|
/// <returns></returns>
|
||
|
void RemoveAll();
|
||
|
|
||
|
}
|
||
|
}
|