Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
CacheItem.cs
1using System;
2
4{
5 internal class CacheItem<KeyType, ValueType>
6 {
7 private readonly KeyType key;
8 private readonly ValueType value;
9 private readonly DateTime created;
10 private readonly DateTime? expires;
11 private DateTime lastUsed;
12
13 internal CacheItem(KeyType Key, ValueType Value, DateTime Created, DateTime? Expires)
14 {
15 this.key = Key;
16 this.value = Value;
17 this.created = Created;
18 this.expires = Expires;
19 this.lastUsed = Created;
20 }
21
22 internal KeyType Key => this.key;
23 internal ValueType Value => this.value;
24 internal DateTime Created => this.created;
25 internal DateTime? Expires => this.expires;
26
27 internal DateTime LastUsed
28 {
29 get => this.lastUsed;
30 set => this.lastUsed = value;
31 }
32 }
33}