86400*10 ); // 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_lilongwe_23029'; // 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()) { trigger_error('Database connection failed: ' . mysqli_connect_error(), E_USER_ERROR);} $query="SELECT states_divided.state_divided_path, states_divided.s_atoz_cap, countries_divided.country_divided_path, countries_divided.atoz_cap, ad1_url, ad1_alttext, ad1_img_src, city_article, city_links, city_lat, city_lng, city_name, city_name_lower, city_name_path, ahotels.continent_name, ahotels.continent_name_lower, ahotels.country_id, ahotels.country_name, ahotels.country_name_lower, img2, ahotels.US_state, ahotels.state_name, ahotels.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 LEFT JOIN countries_divided ON ahotels.country_id = countries_divided.country_id AND regexp_cd LIKE CONCAT('%',LEFT(ahotels.city_name_lower , 1),'%') LEFT JOIN states_divided ON ahotels.US_state = states_divided.US_state AND regexp_sd LIKE CONCAT('%',LEFT(ahotels.city_name_lower , 1),'%') WHERE ahotels.city_name_path = 'africahotels/malawihotels/lilongwehotels/lilongwehotels' 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 = 23029; $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_divided_path = $row['country_divided_path']; $atoz_cap = $row['atoz_cap']; $state_divided_path = $row['state_divided_path']; $s_atoz_cap = $row['s_atoz_cap']; $country_id = $row['country_id']; $country_name = $row['country_name']; $country_name_lower = $row['country_name_lower']; $hotel_id = $row['hotel_id']; $US_state = $row['US_state']; $state_name = $row['state_name']; $state_name_lower = $row['state_name_lower']; $img2 = $row['img2']; include($_SERVER['DOCUMENT_ROOT'].'/fluidcity10.min.php'); } // end cache $cache->end(); } // everything after this is not cached ?>