[squid-dev] 206 Partial Content Caching

Benson Kwok bkwok at yahoo.com
Thu Sep 13 11:23:02 UTC 2018


Hi,
I have successfully implemented caching of 206 Partial Content as a project at my job and want to know if you guys are interested in pulling it into main branch.  Here is what I did in brief:
- adding range_offset and range_length to StoreEntry- caching single ranged requests by adding the range offset and length to store key hash function so they can be lookup by another request with the same range offset and length- offset and length are also added to StoreMeta so after a restart, the offset and range can be restored- enhancing HTCP so the range header from a peer is parsed and the offset and length are used during HIT/MISS lookup- skip ICP for range request since ICP cannot include range header- adjust store_client.cc copyInfo.offset by range_offset- adjust store_swapout.cc mem->swapout.queue_offset by range_offset- adjust trimSwappable() new_mem_lo by range_offset
I have run through a good amount of testing with multiple clients running same or random range requests and everything seems to be working fine.  Also tried testing HTCP with 2 squids and HTCP messages are correctly answered with HIT/MISS.
The diff can be found here:
https://github.com/squid-cache/squid/compare/master...bkwzwz:206_partial_content_caching


ThanksBenson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squid-cache.org/pipermail/squid-dev/attachments/20180913/a799369a/attachment.html>


More information about the squid-dev mailing list