Temp (Key/Value)

Its a normal Key-Value storage but if the key surpasses the expiry time, will be deleted when requested;

INFO: Default expiry is 1 hour

USAGE

this.db.temp(`<KEY INPUT>`, 'set/get/delete', '<VALUE>', 86400)//24 hours

If the value has expired, the result will be null and deleted. This is perfect for OTP's and user auth.

Last updated