MySQL cache works differently depending on whether you use the MyISAM storage engine or the InnoDB storage engine.
MyISAM caches indexes only, not data. You can use LOAD INDEX INTO CACHE
to preload MyISAM indexes into the key buffer cache. But there is no equivalent statement if you use InnoDB.
InnoDB caches both data and index pages. There's no specialized command to warm up the cache buffers, but you can execute a few SQL statements that do full table-scans and full index-scans to load them into the buffers. You should be able to do this using a script on the server, without resorting to wget
!
I agree with the answer from @code_burgar: 150k rows is small enough that you shouldn't notice much performance penalty while the cache is warming up.
If you're talking about warming up the Query Cache, that's a different issue. You'll have to warm up the Query Cache using specific SQL queries, since that cache keeps result sets associated with those SQL queries verbatim. Your wget
solution is inefficient and probably duplicates a lot of work. You should be able to prime the Query Cache by running a script on the server that executes each query that you want to cache once.
But you may need to do a code review to figure out what those queries are, and periodically update your cache preload script if your code changes.