INNER CODE UNIT · Python

_previous_window_key

alisaifee/limits · limits/aio/storage/redis/__init__.py:134

    def _previous_window_key(self, key: str) -> str:
        """
        Return the previous window's storage key (Sliding window strategy).

        Curvy braces are added on the common pattern with the current window's key,
        so the current and the previous key are stored on the same Redis cluster node.

        Eg: "{constructed_key}/-1"
        """
        return f"{self._current_window_key(key)}/-1"

    def configure_bridge(self) -> None:
        self.bridge.use_basic(**self.options)

    @property
    def base_exceptions(
        self,
    ) -> type[Exception] | tuple[type[Exception], ...]:  # pragma: no cover

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…