code | type | title | description |
---|---|---|---|
true |
page |
pexpire |
MemoryStorage:pexpire |
Sets a timeout (in milliseconds) on a key. After the timeout has expired, the key will automatically be deleted.
Arguments | Type | Description |
---|---|---|
key |
string | Key identifier |
ttl |
int | Time to live of the key, in milliseconds |
options |
JSON Object | Optional parameters |
callback |
function | Callback |
Option | Type | Description | Default |
---|---|---|---|
queuable |
boolean | Make this request queuable or not | true |
Returns the MemoryStorage
object to allow chaining.
Returns a boolean specifying if the operation was successful or not.
<<< ./snippets/pexpire-1.java
Callback response:
true