Skip to content

v1.1.0

Latest
Compare
Choose a tag to compare
@DevSrSouza DevSrSouza released this 31 Jul 20:26
· 3 commits to master since this release

New expire extension for delegates.
Set a time to that key expire when set.

var str: String? by string().expire(5) // when set, will expire in 5 seconds

**Time in seconds

New withExpire extension for delegate
Pair with the time and expiration time of that key.

var str: Pair<String, Int> by string("A default string").withExpire()

str = "New string expiring in 30 seconds" to 30

**Time in seconds
**Expire time can return -2 if the key does not exist or -1 if the key exists but has no associated expire.