Search squid archive

Re: Accelerating proxy not matching cgi files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2011/8/24 Amos Jeffries <squid3@xxxxxxxxxxxxx>:
>
> Maybe. We would need to see the HTTP headers produced by gen.cgi to be sure.
> From the description of how index.cgi/gen.cgi interact I think it highly
> likely the lack of Cache-Control and Last-Modified information from gen.cgi
> is causing the cache algorithms to determine its unsafe to store.
>

I gained access to the code of gen.cgi and made few changes:

        printf("Cache-Control: max-age=600, s-maxage=300\n");
        printf("Last-Modified: %s\n",mdate);

It now fetches timestamp from the URL, parses it to appropriate format
and then outputs as Last-Modified header. Plus I added Cache-Control.
Results are noticable - now I get most of TCP_REFRESH_UNMODIFIED/304
on my test page (gen.cgi links don't change there, so all timestamps
remain the same all the time).

Thank you a lot for these suggestions!

However, I still can't make these URLs/images cached on my squid. Is
there any chance they can be served directly from squid cache when
they do not change? Right now I have reduced network bandwidth
obviously, but not sure about CPU load - it still takes almost the
same time to load URL (about 8 seconds).

Do you have any further tips?


-- 
[ Mateusz 'Blaster' Buc :: blaster@xxxxxxxx :: http://blast3r.info ]
[ There's no place like 127.0.0.1. :: +48 724676983 :: GG: 2937287 ]


[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux