Hi, I would like to expand the Alex Rousskov's idea:

I am not sure changing the URL is the best or even easiest way forward.
Instead, I would try to change how cache key is computed by adding Range information to the hashing function and then adjust the "does the cached store entry match the request" code to account for Range request headers."

Can I create a object that stores a list of range's hashes instead of original data?

I want to store every request individually indexed with an hash calculated with range, but I will keep track of them with another object (indexed with "normal" key) wich will maintain the list of ranges (and keys). That way will permit to HIT a subset of a wider range, or merge ranges, etc.

Flow can be something like that:

Client request
range x-y
   |
   |
   V
Store computes
the "normal" key and
look for it in the
hash table
   |
   |
   V
if the object is a HIT and it is a
"list of ranges object" (1)
it looks in the list for a match
(subset, superset, whole object)

   |------> if any match,
   |            it will retrieve the corresponding(s) object(s)
   |            from disk/mem and it will send it to client
   |
   |------> if not, it will retrieve the range from the origin,
               it will store it with a "range" key and it will add it
               to the list in the  (1)

I really really appreciate if someone can tell me if it's a doable idea, or if there is a best solution.

Paolo Malfatti
CIDIS Camiri


Reply via email to