globus_gass_cache.h(3)

πŸ“¦
version 10.3 Β· 5 versions
, in epel 10, fedora 43, fedora 44, ubuntu resolute, ubuntu stonking

πŸ’– NAME πŸ’–

okay bestie, welcome to globus_gass_cache.h β€” this is the GASS Cache API and it's giving "I hold your cached files and I'm very serious about it" πŸ’…

(it lives in the Library Functions Manual section, if you were wondering where to find it on the shelf πŸŽ€)


🌸 SYNOPSIS 🌸

first things first, you gotta pull in the headers, no cap:

#include 'globus_common.h'
#include <sys/param.h>

πŸŽ€ Macros

one (1) macro, and she's a whole module descriptor:

  • GLOBUS_GASS_CACHE_MODULE β€” defined as (&globus_i_gass_cache_module). it's the module_descriptor for this thing. iconic.
#define GLOBUS_GASS_CACHE_MODULE   (&globus_i_gass_cache_module)

πŸ¦‹ Typedefs

  • globus_gass_cache_t β€” the GASS Cache Handle. this is your lil key to the whole cache kingdom, bestie πŸ”‘
typedef struct globus_i_gass_cache_t * globus_gass_cache_t

✨ Functions

okay so this is the main character section, strap in πŸ’–

  • globus_gass_cache_open β€” opens a GASS Cache. literally what it says.
int globus_gass_cache_open (const char *cache_directory_path,
    globus_gass_cache_t *cache_handle)
  • globus_gass_cache_close β€” closes a cache handle. bye bye 🫢
int globus_gass_cache_close (globus_gass_cache_t *cache_handle)
  • globus_gass_cache_add β€” adds a tag to an URL in the cache. matching them up like a group chat 🧚
int globus_gass_cache_add (globus_gass_cache_t cache_handle, const char
    *url, const char *tag, globus_bool_t create, unsigned long
    *timestamp, char **local_filename)
  • globus_gass_cache_add_done β€” completes adding a cache entry and unlocks it. the unlock is the whole point, don't forget it 😭
int globus_gass_cache_add_done (globus_gass_cache_t cache_handle, const
    char *url, const char *tag, unsigned long timestamp)
  • globus_gass_cache_query β€” queries the GASS Cache. go ask her what she knows πŸ”
int globus_gass_cache_query (globus_gass_cache_t cache_handle, const
    char *url, const char *tag, globus_bool_t wait_for_lock, unsigned
    long *timestamp, char **local_filename, globus_bool_t *is_locked)
  • globus_gass_cache_delete_start β€” removes a cache tag. (the start of the removal, bestie, it's a two-parter)
int globus_gass_cache_delete_start (globus_gass_cache_t cache_handle,
    const char *url, const char *tag, unsigned long *timestamp)
  • globus_gass_cache_delete β€” removes one instance of the tag from the cache entry's tag list. just one. don't get greedy πŸ’…
int globus_gass_cache_delete (globus_gass_cache_t cache_handle, const
    char *url, const char *tag, unsigned long timestamp, globus_bool_t
    is_locked)
  • globus_gass_cache_cleanup_tag β€” removes a tag from a cache entry. tidy queen behavior 🧹
int globus_gass_cache_cleanup_tag (globus_gass_cache_t cache_handle,
    const char *url, const char *tag)
  • globus_gass_cache_cleanup_tag_all β€” removes a tag from all cache entries. going nuclear, respectfully πŸ’€
int globus_gass_cache_cleanup_tag_all (globus_gass_cache_t cache_handle,
    char *tag)

and here's the extra explanation that comes with globus_gass_cache_cleanup_tag_all, verbatim, because the facts stay exactly the facts:

Remove all instances of the tag from the cache entry's tag list. If there are no more tags in the tag list, then remove this cache entry and delete the associated local cache file. If the cache entry is locked with the same tag as is passed to this function, then the entry is unlocked after removing the tags. Otherwise, the cache entry's lock is left untouched. "

(yes, that lone " at the end is literally in the original, iykyk, not me fixing it πŸ™ˆ)

  • globus_gass_cache_mangle_url β€” converts a URL into a string that's suitable to be used as a file path. mangle it, slay it ✨
int globus_gass_cache_mangle_url (const globus_gass_cache_t cache_handle,
    const char *url, char **mangled_url, int *length)
  • globus_gass_cache_mangle_tag β€” converts a tag into a string that's suitable to be used as a file path. same energy, different input πŸŽ€
int globus_gass_cache_mangle_tag (const globus_gass_cache_t cache_handle,
    const char *tag, char **mangled_tag, int *length)
  • globus_gass_cache_get_dirs β€” gets the whole set of directories used by a GASS Cache. the full tour, no skips 🌈
int globus_gass_cache_get_dirs (const globus_gass_cache_t cache_handle,
    const char *url, const char *tag, char **global_root, char **local_root,
    char **tmp_root, char **log_root, char **global_dir, char **local_dir)
  • globus_gass_cache_get_cache_dir β€” gets the GASS Cache's root directory. the mothership 🏠
int globus_gass_cache_get_cache_dir (const globus_gass_cache_t cache_handle,
    char **cache_dir)
  • globus_gass_cache_get_cache_type_string β€” gets the type of GASS Cache directory layout. like, what kind of cache are we, bestie πŸ‘‘
int globus_gass_cache_get_cache_type_string (const globus_gass_cache_t
    cache_handle, char **cache_type)
  • globus_gass_cache_error_string β€” looks up the error string that corresponds to a GASS Cache error. when something goes wrong, this is who tells you what 🚨
const char * globus_gass_cache_error_string (int error_code)

🌟 Detailed Description 🌟

GASS Cache API. that's the whole vibe. that's the assignment. periodt πŸ’…


πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for globus_gass_cache from the source code. (not a human, just a very diligent robot bestie πŸ€–πŸ’–)


okay that's the whole page, you ate it up fr fr 🫢 this was globus_gass_cache, Version 10.3 β€” from the globus_gass_cache.h(3) page, mwah πŸ’‹ go cache something iconic ✨