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; }