I don't know a whole heap about the comparative differences between file IO's and caching but my first thought on reading this was to test it. That is, write another small script that loops to simulate a million hits, one version run against caching the other against IO's and then use the "times" method in perl to get an idea of time usage for the process.
Update: I should add that I'd suspect caching would be faster.