Skip to content

checkperiod only trigger once? #78

Description

@JimmyHwang

I tried following code, but seems only show "A:1 is expired", "A:2" never be show

var myCache = new node_cache( { stdTTL: 50, checkperiod: 20 } );
myCache.set("A:1", Code, 10);
myCache.set("A:2", Code, 25);

myCache.on("expired", function( key, value ){
console.log(key + " is expired");
// ... do something ...
});

How can make it run the expired check by interval?

Metadata

Metadata

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions