this post was submitted on 27 Feb 2025
138 points (98.6% liked)

Programmer Humor

28535 readers
1184 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
top 19 comments
sorted by: hot top controversial new old
[–] joyjoy@lemm.ee 63 points 10 months ago

I checked the headers. This answer is cached.

age: 72
cache-control: max-age=600
x-cache: HIT
x-cache-hits: 2
[–] bjoern_tantau@swg-empire.de 45 points 10 months ago (2 children)

I once had a problem that wasn't caused by chaching.

It was caused by cache invalidation.

[–] thejml@lemm.ee 35 points 10 months ago

There are two hard problems in computing, naming things, cache invalidation, and off by one errors.

[–] PM_Your_Nudes_Please@lemmy.world 15 points 10 months ago

I once had a problem that wasn’t caused by caching. It was caused by Accounts Payable forgetting to pay the internet bill, and the ISP cutting our service halfway through a network test. So the beginning of the test cached that the network had internet access, but then the end of the- wait fuck it was caused by caching

[–] lorty@lemmy.ml 27 points 10 months ago (1 children)

I can't be the only one who has wasted half an hour wondering why something wasn't working before realising the response was cached.

[–] SpaceNoodle@lemmy.world 18 points 10 months ago

Only a half hour? Amateur.

[–] listless@lemmy.cringecollective.io 15 points 10 months ago

nah, it's dns.

[–] Artyom@lemm.ee 13 points 10 months ago

Step 1. I'm certain it's caching

Step 2. After evaluating all the caches, it's definitely not caching.

Step 3. oooohhh, it's not ram caching, it's file caching

Step 4. I checked all those files, they're definitely not caching anything unsafe.

Step 5. Oh, it's the other files that are caching.

[–] slazer2au@lemmy.world 12 points 10 months ago (2 children)

As long as you aren't blaming "the network" or "the firewall" without cause.

[–] AtariDump@lemmy.world 29 points 10 months ago (1 children)
[–] lord_ryvan@ttrpg.network 7 points 10 months ago (1 children)

Now if only there's one for off-by-one errors!

[–] osaerisxero@kbin.melroy.org 11 points 10 months ago

Believe it or not, still DNS

[–] Scoopta@programming.dev 8 points 10 months ago

Usually I do my best to blame the network with cause!

[–] Xanza@lemm.ee 10 points 10 months ago (2 children)
[–] nous@programming.dev 6 points 10 months ago (2 children)

Just because your bowser is not caching does not mean something else between you and the server is not caching as well.

[–] Xanza@lemm.ee 1 points 10 months ago

thought it was obvious, but clearly /s

[–] Aatube@kbin.melroy.org 1 points 10 months ago
[–] Aatube@kbin.melroy.org 2 points 10 months ago

I hear NSA is creating an eight-dimensional KOSANET that scrapes the information from top-secret backdoors in your IDEs to be sent to this marvelous website's server-side caching.

[–] Ephera@lemmy.ml 4 points 10 months ago

I'm currently at the other end of this, in that I'm trying to implement caching for a build tool. And yeah, I do expect to be in for a world of pain.

Biggest problem is that you cannot do caching correctly, unless you know all the inputs upfront. If the user decides they'll use the CPU temperature while building their distribution artifact without telling you about it, you're fucked.
Or well, the user is fucked. Because their CPU temp will not update and they'll never be told about it.

So, the user needs to tell you about every single input, which makes it extremely verbose. I guess, that's why so many build tools have their own custom APIs rather than using file APIs from the stdlib, because it allows you to register e.g. paths as an input, wherever they're created...