4 ms·
Cache Me Not, Cache Me, Cache Me Not
- giancarlostoro 2y agoOne of the first web projects I worked on involved a dozen iframes and calling postMessage to pass around data, it was chaos. Still remember the senior dev of the project did a pull request, the variable was called “cacheMeOutside” I chuckled and approved.
- danpalmer 2y agoGood points, but I'm not sure "push", "pull", "user", or "owned" were particularly well described at the beginning. I've always found that thinking about "static" vs "dynamic" content to be the most useful breakdown. Services often produce a mix of static and dynamic, i.e. it's not all "owned" just because it comes from the service. Similarly "push" and "pull" are a little tricky to reason about, but "upload via a web form" and "deploy via a build pipeline" are much clearer to me. "static" and "dynamic" leads to an easy definition too – if it's in the codebase it's static, and if it's in the database (or referenced by it) it's dynamic. The same rules as in this blog post apply though, high cacheability on static and lower TTLs on dynamic content. In systems of a certain scale this stuff starts to blend together (e.g. if your company runs an internal CDN then everything is dynamic from the perspective of the CDN), but in my experience, static/dynamic and deployed/uploaded is a good place to start that allows for good caching behaviour.
- recroad 2y agoI think of it as two: 1. Invalidates easily
- pilgrim0 2y agoI guess caching is as hard as writing about caching, then. The author, while not sure if to teach or to preach, did a lousy job at both.
- paulddraper 2y agolow quality content for sure
- WaltPurvis 2y agoI couldn't be bothered to assess the quality of the content when the presentation is so childish -- performative aggression, cussing like a 12-year-old boy who thinks it makes him sound cool, etc., it's all totally unnecessary and actively detracts from communicating whatever possibly useful information he might have had to share.
- acer4666 2y agohttps://hachyderm.io/@hazelweakly https://hachyderm.io/@hazelweakly she/her pronouns
- defrost 2y agofor a 12 year old boy? Recall that in Game of Thrones the young Arya (she/her) grabs a light fencing stabbing weapon with two hands and flails it about like a 12 year boy playing with a pretend broadsword. Syrio, her teacher, proceeds to correct her and teaching the beginning fundamentals of swordplay. The GP has used a simile cussing like a 12 year boy and could perhaps instead used braying like a donkey, bellowing like a sea lion, cursing like a sailor, etc. The use of a simile does not imply that the subject of the simile is a 12 year old boy, a donkey, a sea lion, a sailor, etc.
- decremental 2y ago[dead]
- latexr 2y agoIt doesn’t seem like your parent comment is referring to the “12-year-old boy” part of its parent comment, but the “(…) information he might have (…)” part (near the end).
- kunley 2y agoThis is much more intelligent article on caching: https://calpaterson.com/ttl-hell.html https://calpaterson.com/ttl-hell.html
- navjack27 2y agoHey here's a cool tip. Why don't you submit it to hacker News? Why am I being downvoted for telling someone to submit this link to this website?
- kunley 2y agoI don't know why people downvoted you. Anyway, this article was here already: https://news.ycombinator.com/item?id=26409076 https://news.ycombinator.com/item?id=26409076
- deleted 2y ago[deleted]