Class RatelimitCache

java.lang.Object
org.easypeelsecurity.springdog.manager.ratelimit.RatelimitCache

public final class RatelimitCache extends Object
Ratelimit cache instance.
  • Method Details

    • ban

      public static void ban(String requestHashed, LocalDateTime banUntil)
    • clearCaches

      public static void clearCaches()
    • isBannedRequest

      public static boolean isBannedRequest(String requestHashed, org.easypeelsecurity.springdog.shared.dto.EndpointDto endpoint, LocalDateTime nowTime)
      When this method called, add access timestamp to the local database. and check if the request is banned or not by the ratelimit rule.
      Parameters:
      requestHashed - request information hashed
      endpoint - endpoint information
      nowTime - now time
      Returns:
      true if the request is banned, false otherwise