Fix Cache documentation

Fixed malformed code snippets, formatted whitespace and changed invalid
external link.
Merge pull request #379 from Xaerxess/fix-doc-cache

* fix-doc-cache:
  Fix Cache documentation