May
11
2010
Episode 68: Intro to Caching
Podcast: Play in new window | Download
Cache your pages to reduce latency and conserve bandwidth.
News and Follow-ups – 00:40
- Mark sold his soul to Steve Jobs and got a Mac
Geek Tool – 07:41
- KR Tools Autoloader Screwdriver – $24.63
Webapps – 09:58
Topic – 14:42
- Caching
- What is caching?
- Why?
- Reduce latency
- Reduce network traffic
- Headers
- Last-Modified
- Expires
- Cache-Control
- no-cache
- no-store
- no-transform.
- must-revalidate
- proxy-revalidate>
- max-age<
- cache-extension
- public
- Etags
- Implemented differently across different servers
- User requests a page and returns the etag, if the etag is the same server sends 304 Not Modified, if different sends 200
- http://joshua.schachter.org/2006/11/apache-etags.html
- Don’t change files unnecessarily. For example, don’t re-upload your entire site when you only change a few files as you will have a falsely young last-modified tag.
- Strategies
- Set far future expire headers
- Data caching
- memcached – A big giant key/value memory store
- Caching while developing
- A word of wisdom
- Tools
- Great tool that checks all your headers – http://redbot.org/
- yslow