-
-
Notifications
You must be signed in to change notification settings - Fork 456
/
JsonCacheItem.cs
45 lines (34 loc) · 1.21 KB
/
JsonCacheItem.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
42
43
44
45
using System;
using CacheManager.Core.Internal;
using Newtonsoft.Json;
namespace CacheManager.Core
{
internal class JsonCacheItem<T> : SerializerCacheItem<T>
{
[JsonConstructor]
public JsonCacheItem()
{
}
public JsonCacheItem(ICacheItemProperties properties, object value) : base(properties, value)
{
}
[JsonProperty("createdUtc")]
public override long CreatedUtc { get; set; }
[JsonProperty("expirationMode")]
public override ExpirationMode ExpirationMode { get; set; }
[JsonProperty("expirationTimeout")]
public override double ExpirationTimeout { get; set; }
[JsonProperty("key")]
public override string Key { get; set; }
[JsonProperty("lastAccessedUtc")]
public override long LastAccessedUtc { get; set; }
[JsonProperty("region")]
public override string Region { get; set; }
[JsonProperty("usesDefaultExpiration")]
public override bool UsesExpirationDefaults { get; set; }
[JsonProperty("valueType")]
public override string ValueType { get; set; }
[JsonProperty("value")]
public override T Value { get; set; }
}
}