keyv.expiry0.000005
Gets the expiry of a key.
Arguments
bucketrequired
The bucket the key is stored under.key
The key to get the expiry for.Return Value
The timestamp the key expiry, or null if the key is not set to expire or does not exist.something went wrong :(
Getting the expiry for a key
Setup
authorization=PROCAUTH
require "proc"
client = Proc.connect("PROCAUTH")
const Proc = require("@proc.dev/client");
const client = Proc.connect("PROCAUTH");
client.keyv.set.call(
bucket: "ub4f6a44", value: "foo", ttl: 60
)
client.keyv.expiry.call(
bucket: "ub4f6a44"
)
client.keyv.set.call(
undefined, ub4f6a44
);
client.keyv.expiry.call(
undefined, ub4f6a44
);
curl "https://proc.run/keyv/set?bucket=ub4f6a44&ttl=60" --silent \
--header "authorization: bearer $authorization" \
--header "content-type: text/plain" \
--data "foo"
curl "https://proc.run/keyv/expiry?bucket=ub4f6a44" --silent --request POST \
--header "authorization: bearer $authorization" \
--header "content-type: text/plain"
1617997463.117263
Stuck? Want to chat about an idea? Join the community on Discord.