INNER CODE UNIT · Python
clear
alisaifee/limits · limits/aio/storage/redis/__init__.py:172
async def clear(self, key: str) -> None:
"""
:param key: the key to clear rate limits for
"""
return await self.bridge.clear(key)
async def acquire_entry(
self, key: str, limit: int, expiry: int, amount: int = 1
) -> bool:
"""
:param key: rate limit key to acquire an entry in
:param limit: amount of entries allowed
:param expiry: expiry of the entry
:param amount: the number of entries to acquire
"""
return await self.bridge.acquire_entry(key, limit, expiry, amount)