[Tilecache] PATCH: X-SendFile and Expires headers

Alexandre Dube adube at mapgears.com
Thu Nov 5 10:08:47 EST 2009


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

mdeneen+tiles at saucontech.com wrote:
> This patch adds X-SendFile and the ability to set an Expires header.  It is a patch against tilecache 2.10.
>
> Once applied, you can specify two new options under [cache] in the tilecache.cfg:
>
> sendfile=yes
>     This instructs tilecache to not read the tile image and send the fully qualified file name back to the web server in a X-SendFile header.  This avoids both python and the web server from holding the tile in memory at the same time.  The web server serves the tile directly to the client.
> expires=n
>     ...where nnnn is the number of hours from access time you wish to have the tiles possibly cached in the client browser.
>
> I've tested this with lighttpd and apache (with mod_xsendfile http://tn123.ath.cx/mod_xsendfile/), and it works perfectly.  I've not tried seeding the cache with this.  You might have to disable sendfile to do that.  I'll test tomorrow.
>
> Best Regards,
> Mark Deneen
> Saucon Technologies
> ------------------------------------------------------------------------
>
> _______________________________________________
> Tilecache mailing list
> Tilecache at openlayers.org
> http://openlayers.org/mailman/listinfo/tilecache


-- 
Alexandre Dubé
Mapgears
www.mapgears.com




More information about the Tilecache mailing list