ETag/Last-Modified or mod_expires

7 messages Options
Embed this post
Permalink
Alexandre Dube

ETag/Last-Modified or mod_expires

Reply Threaded More More options
Print post
Permalink
Hi,

  A year ago, I asked about client-side caching [1].  I would have used
max-age, but Attila proposed a ETag/Last-Modified better solution [2].  
Currently, it would seems this solution is not in trunk, yet (or maybe
I'm wrong about this).

  If not, will it be in trunk someday and usable ?  Or is there a patch
I could try ?  Or is mod_expires still the good solution (and should
work with mod_python) ?

  Sorry for asking so many questions.

  Regards,

[1] http://n2.nabble.com/Max-Age-td1837643.html#a1837643
[2]
http://n2.nabble.com/http-304-Not-Modifies-responses-td1837020.html#a1837020

--
Alexandre Dubé
Mapgears
www.mapgears.com

_______________________________________________
Tilecache mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/tilecache
Alexandre Dube

Re: ETag/Last-Modified or mod_expires

Reply Threaded More More options
Print post
Permalink
(I accidentally replied to the original thread, sorry)

I just read about X-SendFile [1].  I'll try that.

Regards,

Alexandre

[1]
http://n2.nabble.com/PATCH-X-SendFile-and-Expires-headers-td3771732.html#a3771732

Alexandre Dube wrote:

> Hi,
>
>   A year ago, I asked about client-side caching [1].  I would have used
> max-age, but Attila proposed a ETag/Last-Modified better solution [2].  
> Currently, it would seems this solution is not in trunk, yet (or maybe
> I'm wrong about this).
>
>   If not, will it be in trunk someday and usable ?  Or is there a patch
> I could try ?  Or is mod_expires still the good solution (and should
> work with mod_python) ?
>
>   Sorry for asking so many questions.
>
>   Regards,
>
> [1] http://n2.nabble.com/Max-Age-td1837643.html#a1837643
> [2]
> http://n2.nabble.com/http-304-Not-Modifies-responses-td1837020.html#a1837020
>
>  


--
Alexandre Dubé
Mapgears
www.mapgears.com

_______________________________________________
Tilecache mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/tilecache
Mark Deneen-2

Re: ETag/Last-Modified or mod_expires

Reply Threaded More More options
Print post
Permalink
Christopher altered the patch a bit so that it works with KML, and the
expiration is in seconds.  I don't think a new TileCache has been
released yet, so keep this in mind for when your cache settings change a
bit when you upgrade.

Mark

Alexandre Dube wrote:

> (I accidentally replied to the original thread, sorry)
>
> I just read about X-SendFile [1].  I'll try that.
>
> Regards,
>
> Alexandre
>
> [1]
> http://n2.nabble.com/PATCH-X-SendFile-and-Expires-headers-td3771732.html#a3771732
>
> Alexandre Dube wrote:
>  
>> Hi,
>>
>>   A year ago, I asked about client-side caching [1].  I would have used
>> max-age, but Attila proposed a ETag/Last-Modified better solution [2].  
>> Currently, it would seems this solution is not in trunk, yet (or maybe
>> I'm wrong about this).
>>
>>   If not, will it be in trunk someday and usable ?  Or is there a patch
>> I could try ?  Or is mod_expires still the good solution (and should
>> work with mod_python) ?
>>
>>   Sorry for asking so many questions.
>>
>>   Regards,
>>
>> [1] http://n2.nabble.com/Max-Age-td1837643.html#a1837643
>> [2]
>> http://n2.nabble.com/http-304-Not-Modifies-responses-td1837020.html#a1837020
>>
>>  
>>    
>
>
>  

_______________________________________________
Tilecache mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/tilecache
Alexandre Dube

Re: ETag/Last-Modified or mod_expires

Reply Threaded More More options
Print post
Permalink
In reply to this post by Alexandre Dube
Alexandre Dube wrote:
> (I accidentally replied to the original thread, sorry)
>
> I just read about X-SendFile [1].  I'll try that.
>  

phpinfo.php reveals that the mod_sendfile is loaded, but it doesn't seem
to be used by TileCache.  Is there a way to validate that ?

Thanks,

Alexandre

> Regards,
>
> Alexandre
>
> [1]
> http://n2.nabble.com/PATCH-X-SendFile-and-Expires-headers-td3771732.html#a3771732
>
>  


--
Alexandre Dubé
Mapgears
www.mapgears.com

_______________________________________________
Tilecache mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/tilecache
Mark Deneen-2

Re: ETag/Last-Modified or mod_expires

Reply Threaded More More options
Print post
Permalink
Alexandre,

#curl -I http://www.example.com/some/url

HTTP/1.1 200 OK
Content-Type: image/png
Expires: Wed, 12 May 2010 07:36:42 GMT
Content-Length: 18154
Date: Thu, 05 Nov 2009 19:36:42 GMT
Server: lighttpd/1.4.23

Here, you can see the expires tag is set.  To know if X-SendFile is
active is a little harder, as the headers sent to the browser will not
indicate anything because the SendFile magic happens between TileCache
and the web server.

If you have SendFile enabled in TileCache, you can try disabling
SendFile in Apache, and see what happens.  If Apache support is
disabled, I believe you should see the X-SendFile header in the response
because Apache does not handle it.

You may need both  

XSendFile on
XSendFileAllowAbove on

in your apache configuration.

Mark


Alexandre Dube wrote:

> Alexandre Dube wrote:
>  
>> (I accidentally replied to the original thread, sorry)
>>
>> I just read about X-SendFile [1].  I'll try that.
>>  
>>    
>
> phpinfo.php reveals that the mod_sendfile is loaded, but it doesn't seem
> to be used by TileCache.  Is there a way to validate that ?
>
> Thanks,
>
> Alexandre
>
>  
>> Regards,
>>
>> Alexandre
>>
>> [1]
>> http://n2.nabble.com/PATCH-X-SendFile-and-Expires-headers-td3771732.html#a3771732
>>
>>  
>>    
>
>
>  

_______________________________________________
Tilecache mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/tilecache
Alexandre Dube

Re: ETag/Last-Modified or mod_expires

Reply Threaded More More options
Print post
Permalink
Hi Mark,

  Thanks a lot for taking the time to answer me.

  I'm currently trying the "curl" command with the different
possibilities you proposed but none of them showed the "Expires" tag...  
still scratching my head...

Alexandre

Mark Deneen wrote:

> Alexandre,
>
> #curl -I http://www.example.com/some/url
>
> HTTP/1.1 200 OK
> Content-Type: image/png
> Expires: Wed, 12 May 2010 07:36:42 GMT
> Content-Length: 18154
> Date: Thu, 05 Nov 2009 19:36:42 GMT
> Server: lighttpd/1.4.23
>
> Here, you can see the expires tag is set.  To know if X-SendFile is
> active is a little harder, as the headers sent to the browser will not
> indicate anything because the SendFile magic happens between TileCache
> and the web server.
>
> If you have SendFile enabled in TileCache, you can try disabling
> SendFile in Apache, and see what happens.  If Apache support is
> disabled, I believe you should see the X-SendFile header in the response
> because Apache does not handle it.
>
> You may need both  
>
> XSendFile on
> XSendFileAllowAbove on
>
> in your apache configuration.
>
> Mark
>  



--
Alexandre Dubé
Mapgears
www.mapgears.com

_______________________________________________
Tilecache mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/tilecache
Alexandre Dube

Re: ETag/Last-Modified or mod_expires [solved]

Reply Threaded More More options
Print post
Permalink
List,

  I had an other 2.10 TC version installed in my system conflicting with
my trunk version of TC.  Removing it and fixing some apache
configuration settings showed that the X-SendFile works perfectly with
current trunk version.

  Special thanks to Mark for his help,

Alexandre

Alexandre Dube wrote:

> Hi Mark,
>
>   Thanks a lot for taking the time to answer me.
>
>   I'm currently trying the "curl" command with the different
> possibilities you proposed but none of them showed the "Expires" tag...  
> still scratching my head...
>
> Alexandre
>
> Mark Deneen wrote:
>  
>> Alexandre,
>>
>> #curl -I http://www.example.com/some/url
>>
>> HTTP/1.1 200 OK
>> Content-Type: image/png
>> Expires: Wed, 12 May 2010 07:36:42 GMT
>> Content-Length: 18154
>> Date: Thu, 05 Nov 2009 19:36:42 GMT
>> Server: lighttpd/1.4.23
>>
>> Here, you can see the expires tag is set.  To know if X-SendFile is
>> active is a little harder, as the headers sent to the browser will not
>> indicate anything because the SendFile magic happens between TileCache
>> and the web server.
>>
>> If you have SendFile enabled in TileCache, you can try disabling
>> SendFile in Apache, and see what happens.  If Apache support is
>> disabled, I believe you should see the X-SendFile header in the response
>> because Apache does not handle it.
>>
>> You may need both  
>>
>> XSendFile on
>> XSendFileAllowAbove on
>>
>> in your apache configuration.
>>
>> Mark
>>  
>>    
>
>
>
>  


--
Alexandre Dubé
Mapgears
www.mapgears.com

_______________________________________________
Tilecache mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/tilecache