forked from nhibernate/nhibernate-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCacheMode.cs
41 lines (36 loc) · 1.17 KB
/
CacheMode.cs
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
using System;
namespace NHibernate
{
/// <summary>
/// Controls how the session interacts with the second-level
/// cache and query cache.
/// </summary>
[Serializable, Flags]
public enum CacheMode
{
/// <summary>
/// The session will never interact with the cache, except to invalidate
/// cache items when updates occur
/// </summary>
Ignore = 0,
/// <summary>
/// The session will never read items from the cache, but will add items
/// to the cache as it reads them from the database.
/// </summary>
Put = 1,
/// <summary>
/// The session may read items from the cache, but will not add items,
/// except to invalidate items when updates occur
/// </summary>
Get = 2,
/// <summary> The session may read items from the cache, and add items to the cache</summary>
Normal = Put | Get,
/// <summary>
/// The session will never read items from the cache, but will add items
/// to the cache as it reads them from the database. In this mode, the
/// effect of <c>cache.use_minimal_puts</c> is bypassed, in
/// order to <em>force</em> a cache refresh
/// </summary>
Refresh = Put | 4 // NH: include Put but have a different value
}
}