forked from smartstore/SmartStoreNET
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathICache.cs
More file actions
53 lines (43 loc) · 1.45 KB
/
Copy pathICache.cs
File metadata and controls
53 lines (43 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
using System;
using System.Collections.Generic;
namespace SmartStore.Core.Caching
{
/// <summary>
/// Cache holder interface
/// </summary>
public interface ICache
{
/// <summary>
/// Gets all entries in the cache
/// </summary>
IEnumerable<KeyValuePair<string, object>> Entries { get; }
/// <summary>
/// Gets a cache item associated with the specified key
/// </summary>
/// <param name="key">The cache item key</param>
/// <returns>Cached item value</returns>
object Get(string key);
/// <summary>
/// Adds the cache item with the specified key
/// </summary>
/// <param name="key">Key</param>
/// <param name="data">Data</param>
/// <param name="cacheTime">Cache time in minutes</param>
void Set(string key, object value, int? cacheTime);
/// <summary>
/// Gets a value indicating whether an item associated with the specified key exists in the cache
/// </summary>
/// <param name="key">key</param>
/// <returns>Result</returns>
bool Contains(string key);
/// <summary>
/// Removes the value with the specified key from the cache
/// </summary>
/// <param name="key">/key</param>
void Remove(string key);
/// <summary>
/// Gets a value indicating whether reads and writes to this cache should be thread safe
/// </summary>
bool IsSingleton { get; }
}
}