Fix storing knowledge in cache