June 2001
Intermediate to advanced
320 pages
9h 18m
English
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
| Method | URI | MD5 |
|---|---|---|
| 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
| Method | URI | B1 | B2 | B3 | B4 |
|---|---|---|---|---|---|
| GET | http://www.squid-cache.org | 3,389,683 | 3,996,727 | 736,161 | 389,216 |
| GET | http://www.oreilly.com | 17,083 | 1,434,892 | 3,476,644 | 2,874,291 |
| GET | ftp://ftp.ircache.net | 4,185,367 | 4,477,282 | 911,467 | 2,051,263 |