NETCACHE(1)
β¨ NETCACHE β like, the local Internet cache handler for offpunk β¨
okay bestie, gather round, because netcache is genuinely one of those little tools that just works and we're gonna learn her together π
she's a command-line girlie from the General Commands Manual section, and honestly? iconic behaviour.
πΈ SYNOPSIS πΈ
netcache [--path] [--ids] [--offline] [--max-size MAX_SIZE]
[--timeout TIMEOUT] [URL ...]
netcache -h | --help
that's it, that's the whole vibe check π«Ά
π DESCRIPTION π
So. Netcache is a command-line tool that retrieves, caches and lets you access networked content β she's basically your personal little content stash πΎβ¨
By default, netcache will return a cached version of a given URL, and she only downloads it if a cache version doesn't exist yet. No cap. But wait, there's more β you can also hand her a validity duration, in seconds, and then she'll only download the content if the existing cache is older than that validity. It's giving "girl, are you expired or not" π°οΈ
You can also force her into offline mode, so she only fetches resources from the local cache. Otherwise she'd always refresh from the version available online β which, rude of her, but okay. This is also lowkey useful for mapping a given URL to its location in the cache, regardless of whether it's been downloaded first. iykyk πΊοΈ
π Positional arguments π
URLβ download the URL and output the content. yes queen, just give her a link π
π§ Keyword arguments π§
-h,--helpβ show a help message and exit. the classic "help me pls" move π--pathβ output the path to the cache instead of the content of the URL. so she tells you where the thing lives, not the thing itself π--idsβ return a list of id's for the gemini-site instead of the content of the cache. yes bestie, id's, plural, with the apostrophe, exactly like that π--offlineβ do not attempt to download, return the cached version instead, or error if it's absent from the cache. she stays home, no internet for her today ποΈ--max-size MAX_SIZEβ cancel download of items above that size. the value is expressed in megabytes. she's on a diet and it's called boundaries β--timeout TIMEOUTβ time to wait before cancelling the connection. the value is expressed in seconds. don't leave her hanging β³--cache-validity -CACHE_VALIDITYβ Maximum age (in second) of the cached version before redownloading a new version. yes the flag is literally written as--cache-validity -CACHE_VALIDITY, and yes the unit is "second" singular in the original, we do not fix what isn't ours to fix π
β EXIT STATUS β
The netcache utility exits 0 on success, and >0 if an error occurs.
so 0 = slay, anything above 0 = she's not okay, and honestly, relatable π
π ENVIRONMENT π
Set the OFFPUNK_CACHE_PATH environment variable to use another location. like, go ahead, pick your own little home for her π‘
OFFPUNK_CACHE_PATH=/home/ploum/custom-cache netcache.py gemini://some.url
periodt. that's the whole flex π
π¦ FILES π¦
Default cache path is ~/.cache/offpunk. that's where she keeps all her stuff, no judgment β¨
π SEE ALSO π
ansicat(1), migrate-offpunk-cache(1), offpunk(1), openk(1), and https://offpunk.net/ β the whole squad, fr fr π«Ά
π AUTHORS π
Lionel Dricot (Ploum) <offpunk2 at ploum.eu> β thank you for your service, king π
and that's the whole page, bestie! π this little beauty is brought to you by Debian, dated November 25, 2024, and she's giving NETCACHE(1) main character energy from start to finish. go forth and cache responsibly πΈβ¨
π¦ where this page comes from
- nixos 26.05: offpunk 3.1
- nixpkgs unstable: offpunk 3.2
- ubuntu resolute: offpunk 3.0-1 Β· AGPL-3.0-or-later
- ubuntu stonking: offpunk 3.2-1 Β· AGPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms