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.
27 lines
530 B
27 lines
530 B
namespace Connected.Caching;
|
|
|
|
public enum InvalidateBehavior : byte
|
|
{
|
|
RemoveSameInstance = 1,
|
|
KeepSameInstance = 2
|
|
}
|
|
public class CacheEventArgs : EventArgs
|
|
{
|
|
public CacheEventArgs(string id, string key)
|
|
{
|
|
Key = key;
|
|
Id = id;
|
|
}
|
|
|
|
public CacheEventArgs(string id, string key, InvalidateBehavior behavior)
|
|
{
|
|
Key = key;
|
|
Id = id;
|
|
Behavior = behavior;
|
|
}
|
|
|
|
public string Id { get; init; }
|
|
public string Key { get; init; }
|
|
|
|
public InvalidateBehavior Behavior { get; set; } = InvalidateBehavior.RemoveSameInstance;
|
|
} |