enabling browser cache from Mapcache?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

enabling browser cache from Mapcache?

Mark  Volz

Hello,

 

Using Apache, I would like to know if it is possible to set up a browser cache for images from mapcache so that images are stored on the client machine instead of having to get resent from the server.  I enabled mod_expires and noticed that the png files for the buttons are cached unfortunately the mapcache png files are not cached.  I presume it might not be possible to cache images from mapcache when used in WMS mode, but it might be possible when using either WMTS, or TMS mode.

 

Questions:

1.       Am I correct that we cannot use browser or client caching with mapcache in wms mode?

2.       Can we use browser cache when using WMTS or TMS services?

 

I am using GeoMOOSE which should be able to consume xyz TMS tiles.

 

Thanks!

 

Sincerely,

Mark Volz, GISP

Lyon County GIS Coordinator

 


_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users
Reply | Threaded
Open this post in threaded view
|

Re: enabling browser cache from Mapcache?

Dan Little-2
Please take a moment to do a bit more reading about how browser caching works: 

You cannot directly control what the browser chooses to cache but you can use mod_expiry and friendly-reusable URLs (like XYZ tiles) to help in that cause.  Repetitive WMS requests will be caught by the cache but it's much harder to get a hit as it will change when the screen size, resolution, or small shifts in locations differ.

To directly answer your questions:
1. No, you are not correct. The browser CAN cache those requests.
2. Yes, the browser will cache those images.

Cheers.

On Wed, May 30, 2018 at 11:41 AM Mark Volz <[hidden email]> wrote:

Hello,

 

Using Apache, I would like to know if it is possible to set up a browser cache for images from mapcache so that images are stored on the client machine instead of having to get resent from the server.  I enabled mod_expires and noticed that the png files for the buttons are cached unfortunately the mapcache png files are not cached.  I presume it might not be possible to cache images from mapcache when used in WMS mode, but it might be possible when using either WMTS, or TMS mode.

 

Questions:

1.       Am I correct that we cannot use browser or client caching with mapcache in wms mode?

2.       Can we use browser cache when using WMTS or TMS services?

 

I am using GeoMOOSE which should be able to consume xyz TMS tiles.

 

Thanks!

 

Sincerely,

Mark Volz, GISP

Lyon County GIS Coordinator

 

_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users

_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users
Reply | Threaded
Open this post in threaded view
|

Re: enabling browser cache from Mapcache?

Yves Jacolin-2
Dan,

> 1. No, you are not correct. The browser CAN cache those requests.

Hum, in wms mode? I am not sure. In WMTS, TMS, etc mode yes but not in WMS as the request will change each time.

Y.

2018-05-30 19:15 GMT+02:00 Dan Little <[hidden email]>:
Please take a moment to do a bit more reading about how browser caching works: 

You cannot directly control what the browser chooses to cache but you can use mod_expiry and friendly-reusable URLs (like XYZ tiles) to help in that cause.  Repetitive WMS requests will be caught by the cache but it's much harder to get a hit as it will change when the screen size, resolution, or small shifts in locations differ.

To directly answer your questions:
1. No, you are not correct. The browser CAN cache those requests.
2. Yes, the browser will cache those images.

Cheers.

On Wed, May 30, 2018 at 11:41 AM Mark Volz <[hidden email]> wrote:

Hello,

 

Using Apache, I would like to know if it is possible to set up a browser cache for images from mapcache so that images are stored on the client machine instead of having to get resent from the server.  I enabled mod_expires and noticed that the png files for the buttons are cached unfortunately the mapcache png files are not cached.  I presume it might not be possible to cache images from mapcache when used in WMS mode, but it might be possible when using either WMTS, or TMS mode.

 

Questions:

1.       Am I correct that we cannot use browser or client caching with mapcache in wms mode?

2.       Can we use browser cache when using WMTS or TMS services?

 

I am using GeoMOOSE which should be able to consume xyz TMS tiles.

 

Thanks!

 

Sincerely,

Mark Volz, GISP

Lyon County GIS Coordinator

 

_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users

_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users



--
Training and support manager
Camptocamp
Bâtiment le Dauphin - 1er étage
18 rue du Lac Saint André
73382 Le Bourget-du Lac

Tel (France) : +33 4 58 48 20 43
Tel (Switzerland) : +41 21 619 10 43
Mob. : +33 6 18 75 42 21

email : [hidden email]
http://www.camptocamp.com

_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users
Reply | Threaded
Open this post in threaded view
|

Re: enabling browser cache from Mapcache?

jratike80
In reply to this post by Mark Volz

Hi,

 

However, if client like OpenLayers or Leaflet is making 256x256 sized WMS requests they are always the same for the same tile and thus cacheable as well.

 

-Jukka Rahkonen-

 

Lähettäjä: mapserver-users [mailto:[hidden email]] Puolesta Yves Jacolin
Lähetetty: 31. toukokuuta 2018 10:08
Vastaanottaja: Dan Little <[hidden email]>
Kopio: mapserver-users <[hidden email]>; Mark Volz <[hidden email]>
Aihe: Re: [mapserver-users] enabling browser cache from Mapcache?

 

Dan,

> 1. No, you are not correct. The browser CAN cache those requests.

Hum, in wms mode? I am not sure. In WMTS, TMS, etc mode yes but not in WMS as the request will change each time.

Y.

 

2018-05-30 19:15 GMT+02:00 Dan Little <[hidden email]>:

Please take a moment to do a bit more reading about how browser caching works: 

 

You cannot directly control what the browser chooses to cache but you can use mod_expiry and friendly-reusable URLs (like XYZ tiles) to help in that cause.  Repetitive WMS requests will be caught by the cache but it's much harder to get a hit as it will change when the screen size, resolution, or small shifts in locations differ.

 

To directly answer your questions:

1. No, you are not correct. The browser CAN cache those requests.

2. Yes, the browser will cache those images.

 

Cheers.

 

On Wed, May 30, 2018 at 11:41 AM Mark Volz <[hidden email]> wrote:

Hello,

 

Using Apache, I would like to know if it is possible to set up a browser cache for images from mapcache so that images are stored on the client machine instead of having to get resent from the server.  I enabled mod_expires and noticed that the png files for the buttons are cached unfortunately the mapcache png files are not cached.  I presume it might not be possible to cache images from mapcache when used in WMS mode, but it might be possible when using either WMTS, or TMS mode.

 

Questions:

1.       Am I correct that we cannot use browser or client caching with mapcache in wms mode?

2.       Can we use browser cache when using WMTS or TMS services?

 

I am using GeoMOOSE which should be able to consume xyz TMS tiles.

 

Thanks!

 

Sincerely,

Mark Volz, GISP

Lyon County GIS Coordinator

 

_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users


_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users




--

Training and support manager
Camptocamp
Bâtiment le Dauphin - 1er étage
18 rue du Lac Saint André
73382 Le Bourget-du Lac

Tel (France) : +33 4 58 48 20 43
Tel (Switzerland) : +41 21 619 10 43
Mob. : +33 6 18 75 42 21

email : [hidden email]
http://www.camptocamp.com


_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users
Reply | Threaded
Open this post in threaded view
|

Re: enabling browser cache from Mapcache?

Yves Jacolin-2
Good point :)

2018-05-31 11:49 GMT+02:00 Rahkonen Jukka (MML) <[hidden email]>:

Hi,

 

However, if client like OpenLayers or Leaflet is making 256x256 sized WMS requests they are always the same for the same tile and thus cacheable as well.

 

-Jukka Rahkonen-

 

Lähettäjä: mapserver-users [mailto:[hidden email]] Puolesta Yves Jacolin
Lähetetty: 31. toukokuuta 2018 10:08
Vastaanottaja: Dan Little <[hidden email]>
Kopio: mapserver-users <[hidden email]>; Mark Volz <[hidden email]>
Aihe: Re: [mapserver-users] enabling browser cache from Mapcache?

 

Dan,

> 1. No, you are not correct. The browser CAN cache those requests.

Hum, in wms mode? I am not sure. In WMTS, TMS, etc mode yes but not in WMS as the request will change each time.

Y.

 

2018-05-30 19:15 GMT+02:00 Dan Little <[hidden email]>:

Please take a moment to do a bit more reading about how browser caching works: 

 

You cannot directly control what the browser chooses to cache but you can use mod_expiry and friendly-reusable URLs (like XYZ tiles) to help in that cause.  Repetitive WMS requests will be caught by the cache but it's much harder to get a hit as it will change when the screen size, resolution, or small shifts in locations differ.

 

To directly answer your questions:

1. No, you are not correct. The browser CAN cache those requests.

2. Yes, the browser will cache those images.

 

Cheers.

 

On Wed, May 30, 2018 at 11:41 AM Mark Volz <[hidden email]> wrote:

Hello,

 

Using Apache, I would like to know if it is possible to set up a browser cache for images from mapcache so that images are stored on the client machine instead of having to get resent from the server.  I enabled mod_expires and noticed that the png files for the buttons are cached unfortunately the mapcache png files are not cached.  I presume it might not be possible to cache images from mapcache when used in WMS mode, but it might be possible when using either WMTS, or TMS mode.

 

Questions:

1.       Am I correct that we cannot use browser or client caching with mapcache in wms mode?

2.       Can we use browser cache when using WMTS or TMS services?

 

I am using GeoMOOSE which should be able to consume xyz TMS tiles.

 

Thanks!

 

Sincerely,

Mark Volz, GISP

Lyon County GIS Coordinator

 

_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users


_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users




--

Training and support manager
Camptocamp
Bâtiment le Dauphin - 1er étage
18 rue du Lac Saint André
73382 Le Bourget-du Lac

Tel (France) : +33 4 58 48 20 43
Tel (Switzerland) : +41 21 619 10 43
Mob. : +33 6 18 75 42 21

email : [hidden email]
http://www.camptocamp.com




--
Training and support manager
Camptocamp
Bâtiment le Dauphin - 1er étage
18 rue du Lac Saint André
73382 Le Bourget-du Lac

Tel (France) : +33 4 58 48 20 43
Tel (Switzerland) : +41 21 619 10 43
Mob. : +33 6 18 75 42 21

email : [hidden email]
http://www.camptocamp.com

_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users
Reply | Threaded
Open this post in threaded view
|

Re: enabling browser cache from Mapcache?

Eichner, Andreas - SID-NLKM
In reply to this post by Mark Volz
Hi,

I just tested with mod_mapcache and it seems to use 300 as the default for the "expires" child element of a tileset.
It sets the Cache-control and Expires headers appropriately - even in WMS mode.
Setting the value to 0 turns of the generation of these headers but the browser (at least FF) still uses the If-Modified-Since header when requesting the image again and the server responds with status 304 (not modified) and an empty body.
So client side caching seems to work as expected.

Kind regards


> -----Original Message-----
> From: mapserver-users [mailto:[hidden email]]
> On Behalf Of Mark Volz
> Sent: Wednesday, May 30, 2018 6:24 PM
> To: [hidden email]
> Subject: [mapserver-users] enabling browser cache from Mapcache?
>
> Hello,
>
>
>
> Using Apache, I would like to know if it is possible to set up a browser
> cache for images from mapcache so that images are stored on the client
> machine instead of having to get resent from the server.  I enabled
> mod_expires and noticed that the png files for the buttons are cached
> unfortunately the mapcache png files are not cached.  I presume it might
> not be possible to cache images from mapcache when used in WMS mode, but
> it might be possible when using either WMTS, or TMS mode.
>
>
>
> Questions:
>
> 1.       Am I correct that we cannot use browser or client caching with
> mapcache in wms mode?
>
> 2.       Can we use browser cache when using WMTS or TMS services?
>
>
>
> I am using GeoMOOSE which should be able to consume xyz TMS tiles.
>
>
>
> Thanks!
>
>
>
> Sincerely,
>
> Mark Volz, GISP
>
> Lyon County GIS Coordinator
>
>

_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users