INNER CODE UNIT · Python
get_moving_window
alisaifee/limits · limits/aio/storage/redis/__init__.py:191
async def get_moving_window(
self, key: str, limit: int, expiry: int
) -> tuple[float, int]:
"""
returns the starting point and the number of entries in the moving
window
:param key: rate limit key
:param expiry: expiry of entry
:return: (previous count, previous TTL, current count, current TTL)
"""
return await self.bridge.get_moving_window(key, limit, expiry)
async def acquire_sliding_window_entry(
self,
key: str,
limit: int,
expiry: int,