diff --git a/cache/bucket/index.html b/cache/bucket/index.html index ee4f523..e4ee282 100644 --- a/cache/bucket/index.html +++ b/cache/bucket/index.html @@ -1,7 +1,7 @@ cache::bucket - Rust

Module cache::bucket[][src]

Modules

+ Change settings

Module cache::bucket[][src]

Modules

type_methods

Structs

Bucket

Enums

Format

encoding formats for persistence

diff --git a/cache/bucket/static.MCAPTCHA_BUCKET_TYPE.html b/cache/bucket/static.MCAPTCHA_BUCKET_TYPE.html index b144ac5..3419764 100644 --- a/cache/bucket/static.MCAPTCHA_BUCKET_TYPE.html +++ b/cache/bucket/static.MCAPTCHA_BUCKET_TYPE.html @@ -1,5 +1,5 @@ cache::bucket::MCAPTCHA_BUCKET_TYPE - Rust

Static cache::bucket::MCAPTCHA_BUCKET_TYPE[][src]

pub static MCAPTCHA_BUCKET_TYPE: RedisType
+ Change settings

Static cache::bucket::MCAPTCHA_BUCKET_TYPE[][src]

pub static MCAPTCHA_BUCKET_TYPE: RedisType
\ No newline at end of file diff --git a/cache/bucket/struct.Bucket.html b/cache/bucket/struct.Bucket.html index d291a15..6c7b633 100644 --- a/cache/bucket/struct.Bucket.html +++ b/cache/bucket/struct.Bucket.html @@ -9,13 +9,13 @@ Fieldstimer: u64

timer ID

bucket_instant: u64

instant(seconds from UNIX_EPOCH) at which time bucket begins decrement process

decrement: HashMap<String, u32>

a list of captcha keys that should be decremented during clean up

-

Implementations

impl Bucket[src]

pub fn on_delete(
    ctx: &Context,
    _event_type: NotifyEvent,
    _event: &str,
    key_name: &str
)
[src]

fn new(ctx: &Context, duration: u64) -> Result<Self, CacheError>[src]

creates new bucket and sets off timer to go off at duration

+

Implementations

impl Bucket[src]

pub fn on_delete(
    ctx: &Context,
    _event_type: NotifyEvent,
    _event: &str,
    key_name: &str
)
[src]

fn new(ctx: &Context, duration: u64) -> Result<Self, CacheError>[src]

creates new bucket and sets off timer to go off at duration

fn decrement_runner(ctx: &Context, key: &RedisKeyWritable)[src]

decrement runner that decrements all registered counts without cleaning after itself use [decrement] when you require auto cleanup. Internally, it calls this method.

-

fn decrement(ctx: &Context, bucket_instant: u64)[src]

executes when timer goes off. Decrements all registered counts and cleans itself up

-

fn increment(ctx: &Context, captcha: &str) -> Result<String, CacheError>[src]

increments count of key = captcha and registers for auto decrement

-

pub fn increment_by(
    ctx: &Context,
    (captcha_name, duration): (String, u64),
    increment_by: u32
) -> Result<(), CacheError>
[src]

open bucket, set decrement by specified number

-

pub fn counter_create(ctx: &Context, args: Vec<String>) -> RedisResult[src]

Create new counter

+

fn decrement(ctx: &Context, bucket_instant: u64)[src]

executes when timer goes off. Decrements all registered counts and cleans itself up

+

fn increment(ctx: &Context, captcha: &str) -> Result<String, CacheError>[src]

increments count of key = captcha and registers for auto decrement

+

pub fn increment_by(
    ctx: &Context,
    (captcha_name, duration): (String, u64),
    increment_by: u32
) -> Result<(), CacheError>
[src]

open bucket, set decrement by specified number

+

pub fn counter_create(ctx: &Context, args: Vec<String>) -> RedisResult[src]

Create new counter

Trait Implementations

impl Clone for Bucket[src]

impl Debug for Bucket[src]

Function cache::bucket::type_methods::free[][src]

pub unsafe extern "C" fn free(value: *mut c_void)
\ No newline at end of file diff --git a/cache/bucket/type_methods/fn.rdb_load.html b/cache/bucket/type_methods/fn.rdb_load.html index 06ae6b9..b379fda 100644 --- a/cache/bucket/type_methods/fn.rdb_load.html +++ b/cache/bucket/type_methods/fn.rdb_load.html @@ -1,5 +1,5 @@ cache::bucket::type_methods::rdb_load - Rust

Function cache::bucket::type_methods::rdb_load[][src]

pub extern "C" fn rdb_load(
    rdb: *mut RedisModuleIO,
    encver: c_int
) -> *mut c_void
+ Change settings

Function cache::bucket::type_methods::rdb_load[][src]

pub extern "C" fn rdb_load(
    rdb: *mut RedisModuleIO,
    encver: c_int
) -> *mut c_void
\ No newline at end of file diff --git a/cache/bucket/type_methods/fn.rdb_save.html b/cache/bucket/type_methods/fn.rdb_save.html index bc6cb8f..b5dec9e 100644 --- a/cache/bucket/type_methods/fn.rdb_save.html +++ b/cache/bucket/type_methods/fn.rdb_save.html @@ -1,5 +1,5 @@ cache::bucket::type_methods::rdb_save - Rust

Function cache::bucket::type_methods::rdb_save[][src]

pub unsafe extern "C" fn rdb_save(rdb: *mut RedisModuleIO, value: *mut c_void)
+ Change settings

Function cache::bucket::type_methods::rdb_save[][src]

pub unsafe extern "C" fn rdb_save(rdb: *mut RedisModuleIO, value: *mut c_void)
\ No newline at end of file diff --git a/cache/bucket/type_methods/index.html b/cache/bucket/type_methods/index.html index 1cca7c9..0ed20b0 100644 --- a/cache/bucket/type_methods/index.html +++ b/cache/bucket/type_methods/index.html @@ -1,6 +1,6 @@ cache::bucket::type_methods - Rust

Module cache::bucket::type_methods[][src]

Functions

+ Change settings

Module cache::bucket::type_methods[][src]

Functions

free
rdb_load
rdb_save
\ No newline at end of file diff --git a/search-index.js b/search-index.js index 91bffc6..4aa88b1 100644 --- a/search-index.js +++ b/search-index.js @@ -1,4 +1,4 @@ var searchIndex = JSON.parse('{\ -"cache":{"doc":"","t":[0,0,5,5,5,17,4,13,11,11,3,12,12,12,11,11,11,11,11,11,11,7,0,4,13,13,13,11,6,0,0,5,5,5,17,3,12,11,11,11,11,11,11,11,11,11,11,11,11,11,11,7,0,0,17,5,5,5,17,3,11,11,11,11,7,0,5,5,5,5,5,5,5,5,5,17,17,17,17,17,17,3,12,3,12,3,12,5,5,5,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11],"n":["bucket","type_methods","rdb_load","free","rdb_save","REDIS_MCAPTCHA_BUCKET_TYPE_VERSION","Format","JSON","parse_str","from_str","Bucket","timer","bucket_instant","decrement","on_delete","new","decrement_runner","decrement","increment","increment_by","counter_create","MCAPTCHA_BUCKET_TYPE","errors","CacheError","Msg","RedisError","CaptchaNotFound","new","CacheResult","mcaptcha","type_methods","rdb_load","free","rdb_save","REDIS_MCPATCHA_MCAPTCHA_TYPE_VERSION","MCaptcha","m","get_add_visitor_result","new","add_visitor","decrement_visitor","get_difficulty","get_duration","get_visitors","decrement_visitor_by","get_mut_mcaptcha","get_mcaptcha","get_count","add_captcha","captcha_exists","delete_captcha","MCAPTCHA_MCAPTCHA_TYPE","safety","type_methods","SAFETY_RDB_VAL","rdb_load","free","rdb_save","MCAPTCHA_SAFETY_VERSION","MCaptchaSafety","on_delete","new","set_timer","boost","MCAPTCHA_SAFETY_TYPE","utils","get_bucket_name","get_timer_name_from_bucket_name","get_bucket_name_from_timer_name","get_bucket_instant","get_captcha_key","get_safety_name","get_mcaptcha_from_safety","is_bucket_timer","is_mcaptcha_safety","HIT_PER_SECOND","PKG_NAME","PKG_VERSION","PREFIX_BUCKET_TIMER","PREFIX_SAFETY","BUCKET_EXPIRY_OFFSET","ID","__private_field","PREFIX_CAPTCHA","__private_field","PREFIX_BUCKET","__private_field","on_delete","RedisModule_OnLoad","RedisModule_OnUnload","from","into","borrow","borrow_mut","try_from","try_into","type_id","vzip","from","into","to_owned","clone_into","borrow","borrow_mut","try_from","try_into","type_id","vzip","from","into","to_string","borrow","borrow_mut","try_from","try_into","type_id","vzip","from","into","borrow","borrow_mut","try_from","try_into","type_id","vzip","from","into","borrow","borrow_mut","try_from","try_into","type_id","vzip","from","into","borrow","borrow_mut","try_from","try_into","type_id","vzip","from","into","borrow","borrow_mut","try_from","try_into","type_id","vzip","from","into","borrow","borrow_mut","try_from","try_into","type_id","vzip","from","from","from","from","from","from","clone","eq","deref","deref","deref","fmt","fmt","fmt","fmt","initialize","initialize","initialize","serialize","serialize","serialize","deserialize","deserialize","deserialize"],"q":["cache","cache::bucket","cache::bucket::type_methods","","","cache::bucket","","","","","","","","","","","","","","","","","cache","cache::errors","","","","","","cache","cache::mcaptcha","cache::mcaptcha::type_methods","","","cache::mcaptcha","","","","","","","","","","","","","","","","","","cache","cache::safety","cache::safety::type_methods","","","","cache::safety","","","","","","","cache","cache::utils","","","","","","","","","cache","","","","","","","","","","","","","","","cache::bucket","","","","","","","","","","","","","","","","","","cache::errors","","","","","","","","","cache::mcaptcha","","","","","","","","cache::safety","","","","","","","","cache","","","","","","","","","","","","","","","","","","","","","","","","cache::errors","","","","","","cache::bucket","","cache","","","cache::bucket","","cache::errors","","cache","","","cache::bucket","cache::mcaptcha","cache::safety","cache::bucket","cache::mcaptcha","cache::safety"],"d":["","","","","","Bucket type version, aka encoding version","encoding formats for persistence","","","","","timer ID","instant(seconds from UNIX_EPOCH) at which time bucket …","a list of captcha keys that should be decremented during …","","creates new bucket and sets off timer to go off at …","decrement runner that decrements all registered counts …","executes when timer goes off. Decrements all registered …","increments count of key = captcha and registers for auto …","open bucket, set decrement by specified number","Create new counter","","","","","","","","","","","","","","","","","","","increments the visitor count by one","decrements the visitor count by one","get current difficulty factor","get [MCaptcha]’s lifetime","get [MCaptcha]’s current visitor_threshold","decrement [MCaptcha]’s current visitor_threshold by …","get mcaptcha from redis key writable","get mcaptcha from redis key","Get counter value","Add captcha to redis","check if captcha exists","Add captcha to redis","","","","","","","","","","","","","executes when timer goes off. Refreshes expiry timer and …","","","duration in seconds","duration in seconds","duration in seconds","","","","","","","Initial allocation ammount of bucket[bucket::Bucket]","","","bucket timer key prefix","","If buckets perform clean up at x instant, then buckets …","node unique identifier, useful when running in cluster …","","counter/captcha key prefix","","bucket key prefix","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""],"i":[0,0,0,0,0,0,0,1,1,1,0,2,2,2,2,2,2,2,2,2,2,0,0,0,3,3,3,3,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,5,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,0,7,0,8,0,0,0,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,8,8,8,8,8,8,8,8,3,3,3,3,3,3,2,1,6,7,8,1,2,3,3,6,7,8,2,4,5,2,4,5],"f":[null,null,[[["c_int",6]]],[[]],[[]],null,null,null,[[["str",15]],[["deserialize",8],["result",4],["cacheerror",4]]],[[["str",15]],[["deserialize",8],["result",4],["cacheerror",4]]],null,null,null,null,[[["notifyevent",3],["context",3],["str",15]]],[[["context",3],["u64",15]],[["cacheerror",4],["result",4]]],[[["context",3],["rediskeywritable",3]]],[[["context",3],["u64",15]]],[[["context",3],["str",15]],[["result",4],["string",3],["cacheerror",4]]],[[["u32",15],["context",3]],[["result",4],["cacheerror",4]]],[[["vec",3],["context",3],["string",3]],["redisresult",6]],null,null,null,null,null,null,[[["string",3]]],null,null,null,[[["c_int",6]]],[[]],[[]],null,null,null,[[],["addvisitorresult",3]],[[["createmcaptcha",3]],[["cacheerror",4],["result",4]]],[[]],[[]],[[],["u32",15]],[[],["u64",15]],[[],["u32",15]],[[["u32",15]]],[[["rediskeywritable",3]],[["option",4],["cacheerror",4],["result",4]]],[[["rediskey",3]],[["option",4],["cacheerror",4],["result",4]]],[[["vec",3],["context",3],["string",3]],["redisresult",6]],[[["vec",3],["context",3],["string",3]],["redisresult",6]],[[["vec",3],["context",3],["string",3]],["redisresult",6]],[[["vec",3],["context",3],["string",3]],["redisresult",6]],null,null,null,null,[[["c_int",6]]],[[]],[[]],null,null,[[["notifyevent",3],["context",3],["str",15]]],[[["str",15],["context",3],["u64",15]],[["result",4],["cacheerror",4]]],[[["context",3],["rediskeywritable",3]],[["result",4],["cacheerror",4]]],[[["context",3]]],null,null,[[["u64",15]],["string",3]],[[["str",15]],["string",3]],[[["str",15]],[["option",4],["str",15]]],[[["u64",15]],[["result",4],["cacheerror",4],["u64",15]]],[[["str",15]],["string",3]],[[["str",15]],["string",3]],[[["str",15]],[["option",4],["str",15]]],[[["str",15]],["bool",15]],[[["str",15]],["bool",15]],null,null,null,null,null,null,null,null,null,null,null,null,[[["notifyevent",3],["context",3],["str",15]]],[[["c_int",6]],["c_int",6]],[[],["c_int",6]],[[]],[[]],[[]],[[]],[[],["result",4]],[[],["result",4]],[[],["typeid",3]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[],["result",4]],[[],["result",4]],[[],["typeid",3]],[[]],[[]],[[]],[[],["string",3]],[[]],[[]],[[],["result",4]],[[],["result",4]],[[],["typeid",3]],[[]],[[]],[[]],[[]],[[]],[[],["result",4]],[[],["result",4]],[[],["typeid",3]],[[]],[[]],[[]],[[]],[[]],[[],["result",4]],[[],["result",4]],[[],["typeid",3]],[[]],[[]],[[]],[[]],[[]],[[],["result",4]],[[],["result",4]],[[],["typeid",3]],[[]],[[]],[[]],[[]],[[]],[[],["result",4]],[[],["result",4]],[[],["typeid",3]],[[]],[[]],[[]],[[]],[[]],[[],["result",4]],[[],["result",4]],[[],["typeid",3]],[[]],[[["string",3]]],[[["str",15]]],[[["error",3]]],[[["rediserror",4]]],[[["parseinterror",3]]],[[["captchaerror",4]]],[[],["bucket",3]],[[["format",4]],["bool",15]],[[],["usize",15]],[[],["string",3]],[[],["string",3]],[[["formatter",3]],["result",6]],[[["formatter",3]],["result",6]],[[["formatter",3]],["result",6]],[[["formatter",3]],["result",6]],[[]],[[]],[[]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]]],"p":[[4,"Format"],[3,"Bucket"],[4,"CacheError"],[3,"MCaptcha"],[3,"MCaptchaSafety"],[3,"ID"],[3,"PREFIX_CAPTCHA"],[3,"PREFIX_BUCKET"]]}\ +"cache":{"doc":"","t":[0,0,5,5,5,17,4,13,11,11,3,12,12,12,11,11,11,11,11,11,11,7,0,4,13,13,13,11,6,0,0,5,5,5,17,3,12,11,11,11,11,11,11,11,11,11,11,11,11,11,11,7,0,0,17,5,5,5,17,3,11,11,11,11,7,0,5,5,5,5,5,5,5,5,5,17,17,17,17,17,17,3,12,3,12,3,12,5,5,5,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11],"n":["bucket","type_methods","rdb_load","free","rdb_save","REDIS_MCAPTCHA_BUCKET_TYPE_VERSION","Format","JSON","parse_str","from_str","Bucket","timer","bucket_instant","decrement","on_delete","new","decrement_runner","decrement","increment","increment_by","counter_create","MCAPTCHA_BUCKET_TYPE","errors","CacheError","Msg","RedisError","CaptchaNotFound","new","CacheResult","mcaptcha","type_methods","rdb_load","free","rdb_save","REDIS_MCPATCHA_MCAPTCHA_TYPE_VERSION","MCaptcha","m","get_add_visitor_result","new","add_visitor","decrement_visitor","get_difficulty","get_duration","get_visitors","decrement_visitor_by","get_mut_mcaptcha","get_mcaptcha","get_count","add_captcha","captcha_exists","delete_captcha","MCAPTCHA_MCAPTCHA_TYPE","safety","type_methods","SAFETY_RDB_VAL","rdb_load","free","rdb_save","MCAPTCHA_SAFETY_VERSION","MCaptchaSafety","on_delete","new","set_timer","boost","MCAPTCHA_SAFETY_TYPE","utils","get_bucket_name","get_timer_name_from_bucket_name","get_bucket_name_from_timer_name","get_bucket_instant","get_captcha_key","get_safety_name","get_mcaptcha_from_safety","is_bucket_timer","is_mcaptcha_safety","HIT_PER_SECOND","PKG_NAME","PKG_VERSION","PREFIX_BUCKET_TIMER","PREFIX_SAFETY","BUCKET_EXPIRY_OFFSET","ID","__private_field","PREFIX_CAPTCHA","__private_field","PREFIX_BUCKET","__private_field","on_delete","RedisModule_OnLoad","RedisModule_OnUnload","from","into","borrow","borrow_mut","try_from","try_into","type_id","vzip","from","into","to_owned","clone_into","borrow","borrow_mut","try_from","try_into","type_id","vzip","from","into","to_string","borrow","borrow_mut","try_from","try_into","type_id","vzip","from","into","borrow","borrow_mut","try_from","try_into","type_id","vzip","from","into","borrow","borrow_mut","try_from","try_into","type_id","vzip","from","into","borrow","borrow_mut","try_from","try_into","type_id","vzip","from","into","borrow","borrow_mut","try_from","try_into","type_id","vzip","from","into","borrow","borrow_mut","try_from","try_into","type_id","vzip","from","from","from","from","from","from","clone","eq","deref","deref","deref","fmt","fmt","fmt","fmt","initialize","initialize","initialize","serialize","serialize","serialize","deserialize","deserialize","deserialize"],"q":["cache","cache::bucket","cache::bucket::type_methods","","","cache::bucket","","","","","","","","","","","","","","","","","cache","cache::errors","","","","","","cache","cache::mcaptcha","cache::mcaptcha::type_methods","","","cache::mcaptcha","","","","","","","","","","","","","","","","","","cache","cache::safety","cache::safety::type_methods","","","","cache::safety","","","","","","","cache","cache::utils","","","","","","","","","cache","","","","","","","","","","","","","","","cache::bucket","","","","","","","","","","","","","","","","","","cache::errors","","","","","","","","","cache::mcaptcha","","","","","","","","cache::safety","","","","","","","","cache","","","","","","","","","","","","","","","","","","","","","","","","cache::errors","","","","","","cache::bucket","","cache","","","cache::bucket","","cache::errors","","cache","","","cache::bucket","cache::mcaptcha","cache::safety","cache::bucket","cache::mcaptcha","cache::safety"],"d":["","","","","","Bucket type version, aka encoding version","encoding formats for persistence","","","","","timer ID","instant(seconds from UNIX_EPOCH) at which time bucket …","a list of captcha keys that should be decremented during …","","creates new bucket and sets off timer to go off at …","decrement runner that decrements all registered counts …","executes when timer goes off. Decrements all registered …","increments count of key = captcha and registers for auto …","open bucket, set decrement by specified number","Create new counter","","","","","","","","","","","","","","","","","","","increments the visitor count by one","decrements the visitor count by one","get current difficulty factor","get [MCaptcha]’s lifetime","get [MCaptcha]’s current visitor_threshold","decrement [MCaptcha]’s current visitor_threshold by …","get mcaptcha from redis key writable","get mcaptcha from redis key","Get counter value","Add captcha to redis","check if captcha exists","Add captcha to redis","","","","","","","","","","","","","executes when timer goes off. Refreshes expiry timer and …","","","duration in seconds","duration in seconds","duration in seconds","","","","","","","Initial allocation ammount of bucket[bucket::Bucket]","","","bucket timer key prefix","","If buckets perform clean up at x instant, then buckets …","node unique identifier, useful when running in cluster …","","counter/captcha key prefix","","bucket key prefix","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""],"i":[0,0,0,0,0,0,0,1,1,1,0,2,2,2,2,2,2,2,2,2,2,0,0,0,3,3,3,3,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,5,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,0,7,0,8,0,0,0,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,8,8,8,8,8,8,8,8,3,3,3,3,3,3,2,1,6,7,8,1,2,3,3,6,7,8,2,4,5,2,4,5],"f":[null,null,[[["c_int",6]]],[[]],[[]],null,null,null,[[["str",15]],[["deserialize",8],["cacheerror",4],["result",4]]],[[["str",15]],[["deserialize",8],["cacheerror",4],["result",4]]],null,null,null,null,[[["notifyevent",3],["context",3],["str",15]]],[[["context",3],["u64",15]],[["result",4],["cacheerror",4]]],[[["context",3],["rediskeywritable",3]]],[[["context",3],["u64",15]]],[[["context",3],["str",15]],[["string",3],["cacheerror",4],["result",4]]],[[["u32",15],["context",3]],[["result",4],["cacheerror",4]]],[[["vec",3],["context",3],["string",3]],["redisresult",6]],null,null,null,null,null,null,[[["string",3]]],null,null,null,[[["c_int",6]]],[[]],[[]],null,null,null,[[],["addvisitorresult",3]],[[["createmcaptcha",3]],[["result",4],["cacheerror",4]]],[[]],[[]],[[],["u32",15]],[[],["u64",15]],[[],["u32",15]],[[["u32",15]]],[[["rediskeywritable",3]],[["result",4],["cacheerror",4],["option",4]]],[[["rediskey",3]],[["result",4],["option",4],["cacheerror",4]]],[[["vec",3],["context",3],["string",3]],["redisresult",6]],[[["vec",3],["context",3],["string",3]],["redisresult",6]],[[["vec",3],["context",3],["string",3]],["redisresult",6]],[[["vec",3],["context",3],["string",3]],["redisresult",6]],null,null,null,null,[[["c_int",6]]],[[]],[[]],null,null,[[["notifyevent",3],["context",3],["str",15]]],[[["str",15],["context",3],["u64",15]],[["result",4],["cacheerror",4]]],[[["context",3],["rediskeywritable",3]],[["result",4],["cacheerror",4]]],[[["context",3]]],null,null,[[["u64",15]],["string",3]],[[["str",15]],["string",3]],[[["str",15]],[["option",4],["str",15]]],[[["u64",15]],[["result",4],["cacheerror",4],["u64",15]]],[[["str",15]],["string",3]],[[["str",15]],["string",3]],[[["str",15]],[["option",4],["str",15]]],[[["str",15]],["bool",15]],[[["str",15]],["bool",15]],null,null,null,null,null,null,null,null,null,null,null,null,[[["notifyevent",3],["context",3],["str",15]]],[[["c_int",6]],["c_int",6]],[[],["c_int",6]],[[]],[[]],[[]],[[]],[[],["result",4]],[[],["result",4]],[[],["typeid",3]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[],["result",4]],[[],["result",4]],[[],["typeid",3]],[[]],[[]],[[]],[[],["string",3]],[[]],[[]],[[],["result",4]],[[],["result",4]],[[],["typeid",3]],[[]],[[]],[[]],[[]],[[]],[[],["result",4]],[[],["result",4]],[[],["typeid",3]],[[]],[[]],[[]],[[]],[[]],[[],["result",4]],[[],["result",4]],[[],["typeid",3]],[[]],[[]],[[]],[[]],[[]],[[],["result",4]],[[],["result",4]],[[],["typeid",3]],[[]],[[]],[[]],[[]],[[]],[[],["result",4]],[[],["result",4]],[[],["typeid",3]],[[]],[[]],[[]],[[]],[[]],[[],["result",4]],[[],["result",4]],[[],["typeid",3]],[[]],[[["string",3]]],[[["str",15]]],[[["error",3]]],[[["rediserror",4]]],[[["parseinterror",3]]],[[["captchaerror",4]]],[[],["bucket",3]],[[["format",4]],["bool",15]],[[],["usize",15]],[[],["string",3]],[[],["string",3]],[[["formatter",3]],["result",6]],[[["formatter",3]],["result",6]],[[["formatter",3]],["result",6]],[[["formatter",3]],["result",6]],[[]],[[]],[[]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]]],"p":[[4,"Format"],[3,"Bucket"],[4,"CacheError"],[3,"MCaptcha"],[3,"MCaptchaSafety"],[3,"ID"],[3,"PREFIX_CAPTCHA"],[3,"PREFIX_BUCKET"]]}\ }'); initSearch(searchIndex); \ No newline at end of file diff --git a/src/cache/bucket.rs.html b/src/cache/bucket.rs.html index 5e0635d..5d04190 100644 --- a/src/cache/bucket.rs.html +++ b/src/cache/bucket.rs.html @@ -295,6 +295,13 @@ 292 293 294 +295 +296 +297 +298 +299 +300 +301
 /*
  * Copyright (C) 2021  Aravinth Manivannan <realaravinth@batsense.net>
@@ -445,9 +452,16 @@
         let bucket = ctx.open_key_writable(&bucket_name);
         Bucket::decrement_runner(ctx, &bucket);
 
-        match bucket.delete() {
-            Err(e) => ctx.log_warning(&format!("enountered error while deleting hashmap: {:?}", e)),
-            Ok(_) => (),
+        if let Err(e) = bucket.delete() {
+            ctx.log_warning(&format!("enountered error while deleting hashmap: {:?}", e));
+        }
+
+        let timer = ctx.open_key_writable(&get_timer_name_from_bucket_name(&bucket_name));
+        if let Err(e) = timer.delete() {
+            ctx.log_warning(&format!(
+                "enountered error while deleting bucket tiemr: {:?}",
+                e
+            ));
         }
     }