Shouldn't we only cache it if we just generated it, and not if it came from the cache already?