MySQL does some query caching on its own, to cache an entire result set you could print out the result set into some format you can use later. The best option might be to put it into a multi-dimensional array... then serialize() ( www.php.net/serialize ) the resulting array to store for later.
$result = mysql_query ("SELECT * FROM table");
while ($array = mysql_fetch_array ($result)) {
$resultset_array[] = $array;
}
$string = serialize ($resultset_array);
$open = fopen ("mycachefile.txt", "w+");
fwrite ($string, $open);
fclose ($open);