Try to get cached doc before doc conversion, return also cache_key.
Accept cache_key returned by convert.
Test caching for HTML.
Remove unused arg, pyflakes.