Switched to TTL cache for client rate limiter tracking

This commit is contained in:
V
2026-05-09 16:45:36 +01:00
parent d536dde6c9
commit 72348ca5fe
4 changed files with 23 additions and 5 deletions
@@ -1,8 +1,9 @@
from time import sleep
from starlette.applications import Starlette
from starlette.testclient import TestClient
from middleware_starlette import app
from middleware_starlette import app, RateLimiterMiddleware, routes
def test_app_runs():
client = TestClient(app)
@@ -46,4 +47,3 @@ def test_above_rate_limit():
assert successful != 0
assert rate_limited != 0