86400*20 ); // backend options $backendOptions = array( 'cache_dir' => 'cache' // Directory where to put the cache files ); // make object $cache = Zend_Cache::factory('Output', 'File', $frontendOptions, $backendOptions); // make an id $cacheID='area_zallaq_563069'; // everything before this is not cached if (!($cache->start($cacheID))) { // begin cache include($_SERVER['DOCUMENT_ROOT'].'/dbinfo.inc.php'); $mysqli=mysqli_connect('localhost',$username,$password,$database); mysqli_set_charset($mysqli,"utf8"); if (mysqli_connect_errno($mysqli)) { trigger_error( 'Database connection failed: ' . mysqli_connect_error(), E_USER_ERROR); } $query="SELECT ahotels.area_name, ahotels.area_name_path, area_name2, ahotels.city_id, city_name, city_links, city_name_lower, city_name_path, city_map, ad1_url, ad1_img_src, ad1_alttext, country_id, country_name, country_name_lower, img2, state_name, state_name_lower, continent_name, continent_name_lower FROM ahotels LEFT JOIN agoda_cities ON ahotels.city_id = agoda_cities.city_id LEFT JOIN ahotels_img ON ahotels.hotel_id = ahotels_img.hotel_id LEFT JOIN agoda_areasx ON ahotels.area_id = agoda_areasx.area_id WHERE ahotels.area_name_path = 'middleeasthotels/bahrainhotels/manamahotels/zallaqhotels' LIMIT 1"; $result = mysqli_query($mysqli,$query) or trigger_error("Query Failed! SQL: $query - Error: ". mysqli_error($mysqli), E_USER_ERROR); while($row = mysqli_fetch_assoc($result)) { $ad1_url = $row['ad1_url']; $ad1_img_src = $row['ad1_img_src']; $ad1_alttext = $row['ad1_alttext']; $img2 = $row['img2']; $area_id = 563069; $area_name2 = $row['area_name2']; $area_name_lower = 'zallaq'; $area_name_path = $row['area_name_path']; $city_map = $row['city_links']; $city_map = $row['city_map']; $city_name = $row['city_name']; $city_name_lower = $row['city_name_lower']; $city_name_path = $row['city_name_path']; $country_name = $row['country_name']; $state_name = $row['state_name']; $state_name_lower = $row['state_name_lower']; $continent_name = $row['continent_name']; $country_name_lower = $row['country_name_lower']; $continent_name_lower = $row['continent_name_lower']; $city_id = $row['city_id']; $country_id = $row['country_id']; if(!empty($area_name2)) : $area_name = $area_name2; else : $area_name = $row['area_name']; endif; include($_SERVER['DOCUMENT_ROOT'].'/fluidarea5.min.php'); } // end cache $cache->end(); } // everything after this is not cached ?>