def count(self, func_name, request, ip=True, field=None, period=60):
        """Increment counters for all relevant cache_keys given a request."""
        counters = dict((key, (1, time.time() + period)) for key in self._keys(
            func_name, request, ip, field, period))
        counters.update(cache.get_many(counters.keys()))
        for key, value in counters.items():
            # Handle old values.
            if isinstance(value, tuple):
                count, expiration = value
            else:
                count = value
                expiration = time.time() + period
            count += 1
            cache.set(key, (count, expiration), timeout=int(time.time() - expiration))
dataset/ETHPy150Open gmcquillan/django-brake/brake/backends/cachebe.py/CacheBackend.count/swapped operands of `-`