Explain how Shark decides to cache things.