Fix Cache documentation

Fixed malformed code snippets, formatted whitespace and changed invalid
external link.