--- trunk/tntnet/dynamic/temperaturegraph.ecpp 2007/12/02 20:26:43 126 +++ trunk/tntnet/dynamic/temperaturegraph.ecpp 2007/12/08 19:19:07 196 @@ -17,6 +17,8 @@ int id; <{ +reply.setHeader("Cache-Control", "no-cache, must-revalidate"); // Http/1.1 +reply.setHeader("Expires", "Mon, 26 Jul 1997 05:00:00 GMT"); //date in the past GD::Image image; image.CreateTrueColor( GD::Size(600,360)); @@ -49,7 +51,7 @@ ///////////////////////////////////////////////// -tntdb::Connection conn = tntdb::connect(dburl); +tntdb::Connection conn = tntdb::connectCached(dburl); std::stringstream query; query << "SELECT temperature FROM ( "; @@ -84,7 +86,7 @@ // echo the image to the browser... reply.setContentType("image/png"); int size; -unsigned char* ptr = (unsigned char*) image.Png(&size); +unsigned char* ptr = (unsigned char*) image.Png(&size,1); for (int i=0; i