Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Imagine if you created a ticket for a dev to create a cache. The backend is Redis, not local memory.

The dev creates a PR.

The cache is a decorator. It always returns a CachedValue object. The CachedValue object has an API for reading and writing the returned value.

If you write to the CachedValue object it will update Redis with the new, altered value.

It updated Redis not only for the value derived from that key, but all identical values.

This behavior was not included in the ticket. It is not mentioned in the documentation.

It only occurs when the value is mutable.

What do you say to the developer? Job well done? Or what the f*ck is wrong with you?

I’m a nice person so I’d say something nice. I’d ask what they were thinking.

But if their reasons was “this is how caches works” I’d take a serious look at their resume and ask whether they might need some mentoring.



Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: