Mapserver caching and map generation
Ed McNierney
ed at TOPOZONE.COM
Wed Mar 15 12:15:33 PST 2006
Ramesh -
No, MapServer certainly uses those settings. But those are not for
caching - those are for temporary files. In common modes (such as
mode=browse) MapServer has to first create several images - perhaps a
scale bar, overview map, legend image, etc. - and then return to the
calling client an HTML page that contains <IMG> tags referring to each
of those images.
The IMAGEPATH tells MapServer what local file path to use when creating
these files, and IMAGEURL is the URL prefix it should use when
generating URLs to access those images.
It's not a cache. A cache implies that MapServer, in responding to a
request, looks to see if it has already generated the image for that
same request and still has that image file stored locally. It never
does that. Each request generates new image files with unique
filenames, even if the images themselves happen to be identical.
It would be worthwhile to search the mailing list archives for "cache",
as this has been discussed quite recently.
- Ed
Ed McNierney
President and Chief Mapmaker
TopoZone.com / Maps a la carte, Inc.
73 Princeton Street, Suite 305
North Chelmsford, MA 01863
ed at topozone.com
(978) 251-4242
-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
Behalf Of Ramesh Karra
Sent: Wednesday, March 15, 2006 3:09 PM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-USERS] Mapserver caching and map generation
Thanks for the quick reply stephen,
So, the following entries in the map file are not used by the mapserver?
WEB
IMAGEPATH '/ms4w/tmp/ms_tmp/'
IMAGEURL '/ms_tmp/'
END
Anyway, I will post the question to ka-map list.
Thanks again
Ramesh
On Wed, 15 Mar 2006 14:13:17 -0500, Stephen Woodbridge
<woodbri at SWOODBRIDGE.COM> wrote:
>Ramesh,
>
>This has been discussed quite extensively of late. Mapserver does not
>do caching at all. Every mapserver request will generate a new image.
>If you want to do caching, you might look at ka-map which creates a
>tile cache and serves the tiles if they exist or generates them if they
>do not. It is an AJAX client that uses mapserver on the back-end and
>looks like google.
>
>-Steve W.
>
>Ramesh Karra wrote:
>> Hi,
>>
>> I have a related question -
>>
>> I have a map that has 4 tiles at the top level and more tiles as I
>> zoom in. Let's say total tiles at all levels is 256. Once all these
>> 256 tiles are generated, mapserver will just serve these from the
>> cache and will
not
>> generated the same tiles again and again, Am I right?
>>
>> If I configure some kind of RAM based file system as the mapserver
>> cache directory, then all requests will be served from the memory and
>> the performance would be great. I would appreciate if some one could
>> confirm that this is the way mapserver works.
>>
>> Thanks
>> Ramesh
>>
More information about the MapServer-users
mailing list