range request cache

From: Zhu, Shan <Shan.zhu_at_ccur.com>
Date: Tue, 21 Feb 2012 19:09:56 -0500

I have an urgent need for caching requested ranges so I want to do a quick "hack" on this topic before the new feature becomes available.

What I want to achieve is for Squid to cache a range request without pre-fetching and caching the whole object, so that if the cached range is requested again it can be served from the cache.

What I want to do is to change the URL with range request into a unique file name, and once the response is received from the back-end server, the response can be cached as a single object.
The workflow should be like this,

(1) Change URL with range request into something like: "[original URL]_[range start]_[range end]", internally to Squid only.

(2) Squid checks cache to see if it is cached. If yes, Squid responds to the client with the cached object. If no, go to Step 3.

(3) When it is a cache miss in Step 2, Squid forwards the original URL to the back-end server, with range request, as normal. (Not to pre-fetch of = the whole object file.)

(4) Squid receives the response from back-end server, for the requested range only, recognizes it as the response corresponding to the changed URL = "[original URL]_[range start]_[range end]".

(5) Squid caches the range according to the changed URL "[original URL]_[range start]_[range end]", like a single object file.

(6) Squid responds to the client for the URL with range request, as normal.

Here I may have simplified the problem and omitted the time-stamp issue, etc.

Is this doable? How difficult would it be? Can I get any suggestion on how to proceed? I am starting from scratch on the source code change.

Regards,
Shan Zhu
Received on Thu Feb 23 2012 - 14:55:58 MST

This archive was generated by hypermail 2.2.0 : Thu Feb 23 2012 - 12:00:07 MST