implement simple http cache

The cache is simply a Uri -> document list hash table.
The invariant is that the fragment of the Uri won't affect
the caching behaviour.

Updated the example such that it performs repeated actions to
show the caching behaviour.