This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[AttributeUsage(AttributeTargets.Method)] | |
public class ThrottleAttribute : ActionFilterAttribute | |
{ | |
public string Name { get; set; } | |
public int Seconds { get; set; } | |
public string Message { get; set; } | |
private static MemoryCache Cache { get; } = new MemoryCache(new MemoryCacheOptions()); | |
public override void OnActionExecuting(ActionExecutingContext c) |