keyv.touch0.000005
Ensures that a key exists.
Arguments
bucketrequired
The bucket to store the key under.key
The key to touch.Return Value
true
if the key was touched, otherwise false
.keyv.touch
ensures that a key exists. If the touched key does not exist, it will be created with a null value. If the
touched key already exists, its updated timestamp will be changed to the current time.
something went wrong :(
Ensuring that a key exists
Setup
authorization=PROCAUTH
require "proc"
client = Proc.connect("PROCAUTH")
const Proc = require("@proc.dev/client");
const client = Proc.connect("PROCAUTH");
client.keyv.touch.call(
bucket: "af53db92"
)
client.keyv.touch.call(
undefined, af53db92
);
curl "https://proc.run/keyv/touch?bucket=af53db92" --silent --request POST \
--header "authorization: bearer $authorization" \
--header "content-type: text/plain"
true
Stuck? Want to chat about an idea? Join the community on Discord.