Updated to take the latest Cache-Control headers into account