TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

This is a story of caching

95 pointsby terpuaover 14 years ago

6 comments

pilifover 14 years ago
... and then the customer called and asked why the graphs on the front page were wrong even though they clearly just edited hugetable.<p>You explain them that it'll just take a little while to be updated, but the customer didn't like that answer. The data needs to always be current.<p>Apparently, you need to flush parts of the cache as new data arrives. Unfortunately though, you can't as memcache is a strict key/value store. So you change how you name the cache keys and make them dependent of, say the max(timestamp) of your hugetable.<p>Load goes back up to 2 because all requests now still have to check the table.<p>But it's still not as bad.<p>Until the next phone call...
评论 #1675494 未加载
评论 #1675773 未加载
评论 #1675688 未加载
fliphover 14 years ago
For some reason, I started reading the story with the assumption that it was a "don't do it this way" tutorial, and I got very nervous towards the end. ("But that's exactly how I use memcache!")
fizzfurover 14 years ago
hehe, all software documentation should come in 3 forms: Reference, Tutorial and Pop-up Book
评论 #1676188 未加载
sloakover 14 years ago
The real story is in how they push untested code into production just to see what happens. ;)
评论 #1676382 未加载
评论 #1676628 未加载
adamtjover 14 years ago
Programmer and Sysadmin were either very lucky, or not working on anything important, or else they would have been fired or gone out of business. You can't just add caching and magically expect things to work. You have to think hard about expiration policies and test to make sure you aren't going to get wrong answers, or else you need to prove that wrong answers are ok.
mikeklaasover 14 years ago
"All programming is an exercise in caching."<p>-Terje Mathisen