created cache_page() function to remove functionality from main() function
created cache_page() function to remove functionality from main() function