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='city_chonburi_17787'; // 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 ad1_url, ad1_alttext, ad1_img_src, city_article, city_links, city_lat, city_lng, city_name, city_name_lower, city_name_path, continent_name, continent_name_lower, country_id, country_name, country_name_lower, img2, state_name, state_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 WHERE ahotels.city_name_path = 'asiahotels/thailandhotels/chonburihotels/chonburihotels' 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_alttext = $row['ad1_alttext']; $ad1_img_src = $row['ad1_img_src']; $city_article = $row['city_article']; $city_id = 17787; $city_links = $row['city_links']; $city_lng = $row['city_lng']; $city_lat = $row['city_lat']; $city_name = $row['city_name']; $city_name_path = $row['city_name_path']; $city_name_lower = $row['city_name_lower']; $continent_name = $row['continent_name']; $continent_name_lower = $row['continent_name_lower']; $country_id = $row['country_id']; $country_name = $row['country_name']; $country_name_lower = $row['country_name_lower']; $hotel_id = $row['hotel_id']; $state_name = $row['state_name']; $state_name_lower = $row['state_name_lower']; $img2 = $row['img2']; include($_SERVER['DOCUMENT_ROOT'].'/fluidcity9.min.php'); } // end cache $cache->end(); } // everything after this is not cached ?>