Search squid archive

Re: cache-control

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

 



On Tue, Oct 14, 2014 at 3:34 PM, Amos Jeffries <squid3@xxxxxxxxxxxxx> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 15/10/2014 7:14 a.m., Thiago Farina wrote:
>> Hi squiders,
>>
>> We want to move the following Go code into squid, as we already
>> have squid in front of our Go server.
>>
>> The code is:
>>
>> func makeResourceHandler() func(http.ResponseWriter, *http.Request)
>> { fileServer := http.FileServer(http.Dir("./")) return func(w
>> http.ResponseWriter, r *http.Request) {
>> w.Header().Add("Cache-Control", string(300))
>> fileServer.ServeHTTP(w, r) } }
>>
>> and in the main() function we have:
>>
>> http.HandleFunc("/res/",
>> autogzip.HandleFunc(makeResourceHandler()))
>>
>> The only thing close to this I found was 'header_access
>> Cache-Control allow all'.
>>
>> What is the proper way to do this?
>
> Perhapse you could explain what the code does?
>
> If I'm reading that right these are web server actions performed on
> the origin resource (adding resource lifetime control header, and gzip
> content encoding).
>
I think that is true. This res/ directory contains only css, html and js files.

-- 
Thiago Farina
_______________________________________________
squid-users mailing list
squid-users@xxxxxxxxxxxxxxxxxxxxx
http://lists.squid-cache.org/listinfo/squid-users





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

  Powered by Linux