MONGOC_CLIENT_...KEY_EXPIRATION(3)
π MONGOC_CLIENT_...KEY_EXPIRATION(3) π
okay so bestie, this one lives in libmongoc (yep, the C driver for MongoDB) β it's a little setter function that controls how long your data encryption keys chill in the cache before they expire. short page, but it's giving important, so let's go β¨
πΈ SYNOPSIS πΈ
void
mongoc_client_encryption_opts_set_key_expiration (
mongoc_client_encryption_opts_t *opts, uint64_t cache_expiration_ms);
that's it, that's the whole signature π«Ά it returns void, so no sneaky error code to check β respect.
π PARAMETERS π
optsβ themongoc_client_encryption_opts_tyou're configuring. your little options bag, your main character. πcache_expiration_msβ the data encryption key cache expiration time, measured in milliseconds. defaults to60,000(yes, that's the default, no cap). and the iconic part:0means "never expire". zero equals forever, which is lowkey poetic ngl. πβ¨
heads up bestie: 0 literally means the keys never expire from the cache. if you're into keys hanging around indefinitely, that's your setting β just know what you're asking for π
π¦ SEE ALSO π¦
mongoc_client_encryption_new()- In-Use Encryption
like, go read those too, they're the vibes adjacent to this one π₯
π AUTHOR π
MongoDB, Inc β the whole thing is theirs, we're just living in it π
β COPYRIGHT β
2009-present, MongoDB, Inc. β periodt, all rights reserved, don't be weird about it π
and that's the wrap bestie!! this little beauty is from libmongoc version 2.5.6, dated Oct 09, 2024 β go forth and set those expirations responsibly ππ§β¨
π¦ where this page comes from
- epel 10: mongo-c-driver-devel 2.5.6-1.el10_3 Β· Apache-2.0 AND ISC AND MIT AND Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms