An Example

If you find yourself in the position of implementing Cache Digests, you can use the following two tables to verify your code. Table E-2 shows three sample URIs and their MD5 hash values. Table E-3 lists the same three URIs with the bit positions for four hash functions based on the MD5 column in Table E-2. This example uses a MASK_SIZE of 625,000 bytes, or 5,000,000 bits.

Table E-2. Cache Digest Example: URIs and Hash Values

MethodURIMD5
GET http://www.squid-cache.org 69677C33244C8D776D1ED1210E07C120
GET http://www.oreilly.com 4DC8FAFB9B5B0A4C08D992E453059333
GET ftp://ftp.ircache.net F36FB917F5D687629A6E2BEB6BB569FF

Table E-3. Cache Digest Example: URIs and Bit Positions

MethodURIB1B2B3B4
GET http://www.squid-cache.org 3,389,6833,996,727736,161389,216
GET http://www.oreilly.com 17,0831,434,8923,476,6442,874,291
GET ftp://ftp.ircache.net 4,185,3674,477,282911,4672,051,263
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.211.66