keyv.bytesize
0.000005

Gets the bytesize of a key.

Arguments
bucketrequired
The bucket the key is stored under.
key
The key to get the bytesize of.
Return Value
The stored size of the key in bytes, or null if the key does not exist.

keyv.bytesize returns the same value used for billing and equals the sum of the key and value.

something went wrong :(
Getting the bytesize of 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: "cc67fe0f", value: "foo"
)

client.keyv.bytesize.call(
  bucket: "cc67fe0f"
)
client.keyv.set.call(
  undefined, cc67fe0f
);

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

curl "https://proc.run/keyv/bytesize?bucket=cc67fe0f" --silent --request POST \
--header "authorization: bearer $authorization" \
--header "content-type: text/plain"
 

13


Stuck? Want to chat about an idea? Join the community on Discord.