keyv.expiry
0.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: "y0cc19a8", value: "foo", ttl: 60
)

client.keyv.expiry.call(
  bucket: "y0cc19a8"
)
client.keyv.set.call(
  undefined, y0cc19a8
);

client.keyv.expiry.call(
  undefined, y0cc19a8
);
curl "https://proc.run/keyv/set?bucket=y0cc19a8&ttl=60" --silent \
--header "authorization: bearer $authorization" \
--header "content-type: text/plain" \
--data "foo"

curl "https://proc.run/keyv/expiry?bucket=y0cc19a8" --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.