XHTML-CSS.com

This is our blog. It's mainly about programming, web developement and design, social web, coding habits and advice and miscellaneous geekery. You can subscribe to the feeds to never miss a bit.

Something about caching

Permanant link —Nov 17, 10:46 AM

Some people are really nice, and that's what makes me love the Internet. The story was about how will the W3C handle caching in thier 0.9.x series. Since the launch of the bivalidator, we're trying to make it smart and fast and caching is really about that!

Simple comme bonjour, why ask the validator to check a page that didn't changed? We could save some remote processing time and network va-et-vient, hence serve more people smoothly. What's the problem then? Well, not all servers provide cache information about the content they serve, not all provide Last-Modified or Etags in thier response header. Some provide one and not the other, some both and others none.

Philip Semanchuk says grosso modo that it's not our job to "command" the server but to accept what it gives us. Definitely right! Now the question is how to handle the situation when a server provides such information? will we save them ina DB? or concatenate them to the filename in the cache? What about very dynamic websites? The bivalidator at this times uses a fixed TTL which says that a page doesn't change in a given laps of time, it's a mean between two situations:

  1. The website is very dynamic: we won't check it every time it changes
  2. The website is static: we will check it after the TTL even if the page didn't changed

Now, the "smart cache" we're about to build has two goals:

  1. Not rechcking pages that didn't changed
  2. Not checking very dynamic pages every time they change, but every TTL if we're asked to

It's a mixture of the basic fixed TTL cache and the caching-header-aware one. Too much to do -maybe easy things- but God how it's hard to start doing things sometimes! :)


Enjoyed this post? please subscribe to our feeds to stay informed.

Commenting is closed for this article.

« Previous post:
Next post: »