atcache(3)

✨ atcache β€” derived object cache handling ✨

okay bestie, so this is from the AtFS Toolkit Library (atcache(3)), and it's literally just two little functions that handle your derived object cache. short page, but the vibes are immaculate. let's get into it πŸ’…


🌸 NAME 🌸

atSaveCache, atCacheKey β€” derived object cache handling

like, that's it. that's the whole name. two functions, one job: cache management. slay.


πŸŽ€ SYNOPSIS πŸŽ€

#include <atfs.h>
#include <atfstk.h>

int  atSaveCache (Af_key *aso, Af_key *cachedAso, char *uniqAttribute,
int storeType);

char*atCacheKey (Af_key *aso);

yes the spacing is giving unhinged and yes we are keeping it exactly as-is, no cap. 🫢


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so first up, atSaveCache. this one takes your given busy object aso and adds it to the current derived object cache. how does it do that, you ask? it calls af_savecache (peep manual page af_cache(3) for the deets, iykyk).

but wait, there's more β€” before it does any of that, atSaveCache attaches a key attribute with the name __CacheKey__ to aso. that's the little name tag that lets the resulting cached object be uniquely identified within the cache. main character energy fr fr πŸ‘‘

and the return values? they're the same as from af_savecache (again, manual page af_cache(3)). no new rules, no surprises.


next, atCacheKey. she returns an attribute string made of two parts:

  • the attribute name __CacheKey__, and
  • an attribute value built from three things: the aso modification date, the process number, and a (per process unique) serial number. πŸ“

this attribute can β€” and will β€” be used to uniquely identify attributed software objects in derived object caches. it's literally built for that. periodt. πŸ’–


🌈 SEE ALSO 🌈


cute lil sign-off moment: this whole page came to you from AtFStk-1.12, dated Fri Jun 25 16:39:33 1993 β€” a true vintage icon, honestly iconic for its time, and still out here explaining cache keys to us today. mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from