Changed result fetching in cache.php to object oriented style