Re: [ROOT] Carrot cache

From: Valeriy Onuchin (Valeri.Onoutchine@cern.ch)
Date: Thu Sep 05 2002 - 14:03:36 MEST


 Hi Richard,
what's browser you are using? (because sometimes it's browser relative behavior)
Seems it's not the Carrot cache relative problem (I see few strange things in HTTP header).
Help me to reproduce the problem in order to investigate it.

Thanks. Regards. Valeriy

----- Original Message -----
From: "Dubois, Richard" <richard@SLAC.stanford.edu>
To: "Root Discussion (E-mail)" <roottalk@pcroot.cern.ch>
Sent: Thursday, September 05, 2002 6:59 AM
Subject: [ROOT] Carrot cache


> I am running into reproducability problems which I think is coming from not clearing the Carrot
cache. Here is a sample simple  macro:
>
> Bool_t gApacheExec=1;
> file://Bool_t gApacheNoCache=kTRUE;
>
> void version_plot3()
> {
>
>   TApache ap;
>   ap.SetNoCache();
>   // Number of points stored in n
>   int n = 7;
>   TCanvas* myCanvas = new TCanvas("myCanvas","A Simple Graph-Plotting Example",200,10,700,500);
>
>
>   myCanvas->SetFillColor(42);
>   myCanvas->GetFrame()->SetFillColor(21);
>   myCanvas->GetFrame()->SetBorderSize(12);
>   myCanvas->GetFrame()->SetBorderMode(-1);
>
>   // For the graph
>   Double_t x[100], y[100];
>   ap.Printf("n %i \n",n);
>
>   for (Int_t i=0; i<n;i++)

>       x[i] = i;
>       y[i] = 2*i;
>   }
>
>
>   gr = new TGraph(n, x, y);
>   gr->SetTitle("Test CPU Time vs Version Number");
>   gr->Draw("ACP");
>   myCanvas->Update();
>   myCanvas->GetFrame()->SetFillColor(21);
>   myCanvas->GetFrame()->SetBorderSize(12);
>   gr->GetHistogram()->SetXTitle("Version Number");
>   gr->GetHistogram()->SetYTitle("CPU (secs)");
>
>   myCanvas->Modified();
>
>   ap.Put(myCanvas);
>
>
> }// end of version_plot3
>
> and output in my browser window:
>
> n 7 HTTP/1.1 200 OK Date: Thu, 05 Sep 2002 04:51:51 GMT Server: Apache/1.3.23 (Unix) Carrot-1.0.7
Last-Modified: Thu, 05 Sep 2002 04:51:51 GMT ETag: W/"58115-3b8-3d76e2e7" Cache-Control:
no-cache,must-revalidate Pragma: no-cache Expires: -1 Keep-Alive: timeout=15, max=99 Connection:
Keep-Alive, Keep-Alive Transfer-Encoding: chunked, chunked Content-Type: image/jpeg
ÿØÿàJFIFHHÿÛC    -  $.' ",#( ---- plus lots more crap here!
>  For some reason, the browser is not seeing the canvas/plot as a jpeg and is dumping the graphics
to the screen. However in some cases, if I just keep refreshing the browser, the plot will come up.
I tried this macro in straight Root with no TApache stuff and it worked fine. And I've had other
macros which exhibit this weird refresh behaviour. Sometimes they will spontaneously work and
sometimes not.
>
>  I've tried setting SetNoCache, both via the gApache variable and my TApache ap. Only the latter
puts something in the header about no cache. But neither seems to get the job done
>
>  The other thing I don't understand from the how to avoid cache problems url is how to add (if I
need to) the random query to a TApache::Put, specifically ap.Put(myCanvas).
>
>
> Thanks!
>
> Richard
> --
> Richard Dubois
> Stanford Linear Accelerator Center
> 650-926-3824
> 650-926-8616 (FAX)
> richard@slac.stanford.edu
> http://www.slac.stanford.edu/~richard
>
>
>



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:07 MET