Crate cache

source ·

Modules

bucket 🔒
Leaky bucket algorithm is implemantation for mcatpcha using batch processing Everytime count is increased for an mcaptcha object, a decrement job is added to a batch that is scheduled to be executed at that mcaptcha object’s expiry rate(MCaptcha.get_duration())
challenge 🔒
errors 🔒
mcaptcha 🔒
safety 🔒
Custom datastructure that controls mCaptcha lifetime through it’s expiration event handler and callbacks
utils 🔒

Structs

node unique identifier, useful when running in cluster mode
bucket key prefix
counter/captcha key prefix

Constants

If buckets perform clean up at x instant, then buckets themselves will get cleaned up at x + BUCKET_EXPIRY_OFFSET(if they haven’t already been cleaned up)
Initial allocation amount of bucketbucket::Bucket
bucket timer key prefix

Functions