ratelimit

Ratelimit implementation for coverstore.

Adopted from https://github.com/simonw/ratelimitcache

class openlibrary.coverstore.ratelimit.ratelimit(**options)

Bases: object

Instances of this class can be used as decorators

cache_get_many(keys)
cache_incr(key)
current_key()
disallowed()

Over-ride this method if you want to log incidents

expire_after()

Used for setting the memcached cache expiry

get_cache()
get_counters()
keys_to_check()
should_ratelimit()
view_wrapper(fn, *args, **kwargs)

Previous topic

oldb

Next topic

schema

This Page