Applied caching to comment lookups and rewrites.