Actually use cache.

Previously the condition to use cache is never met.