(self, key, window_duration, window_offset=0, keep_windows=1,
                 memoize_timeout=15.0, _CounterCache=None)
:param key: short description of the window e.g. "week"
        :param window_duration: length of the window in seconds
        :param window_offset: offset of window boundary in seconds from the epoch
        :param keep_windows: number of windows to retain (including current one)
        :param memoize_timeout: how long to memoize the information in memory in seconds
            This is the upper limit on how long a `get` could return a stale value.
:param key: short description of the window e.g. "week"
        :param window_duration: length of the window in seconds
        :param window_offset: offset of window boundary in seconds from the epoch
        :param keep_windows: number of windows to retain (including current one)
        :param memoize_timeout: how long to memoize the information in memory in seconds
            This is the upper limit on how long a `get` could return a stale value.
: param key : short description of the window e . g . week : param window_duration : length of the window in seconds : param window_offset : offset of window boundary in seconds from the epoch : param keep_windows : number of windows to retain ( including current one ) : param memoize_timeout : how long to memoize the information in memory in seconds This is the upper limit on how long a get could return a stale value .
def __init__(self, key, window_duration, window_offset=0, keep_windows=1,
                 memoize_timeout=15.0, _CounterCache=None):
        """
        :param key: short description of the window e.g. "week"
        :param window_duration: length of the window in seconds
        :param window_offset: offset of window boundary in seconds from the epoch
        :param keep_windows: number of windows to retain (including current one)
        :param memoize_timeout: how long to memoize the information in memory in seconds
            This is the upper limit on how long a `get` could return a stale value.
        """
        _CounterCache = _CounterCache or CounterCache
        assert keep_windows >= 1
        self.key = key
        self.window_duration = window_duration
        self.window_offset = window_offset
        self.counter = _CounterCache(memoize_timeout, timeout=keep_windows * window_duration)
def __init__ ( self , key , window_duration , window_offset = 0 , keep_windows = 1 , memoize_timeout = 15.0 , _CounterCache = None ) : _CounterCache = _CounterCache or CounterCache assert keep_windows >= 1 self . key = key self . window_duration = window_duration self . window_offset = window_offset self . counter = _CounterCache ( memoize_timeout , timeout = keep_windows * window_duration )