Image Caching, when to update?

Steve Hall steve.hall at MERCATORGEOSYSTEMS.CO.UK
Fri Aug 5 11:23:27 EDT 2005



I use the Oracle MapViewer product in quite a few projects which does have 
some caching facilities which can lead to incredibly fast map production. 
Each layer (theme) has 3 options - no caching, "normal" caching and "all" 

No caching is pretty obvious and I guess (not knowing much about it) is 
synonymous with how MapServer works now.  This is intended for use on 
dynamic data layers.

"Normal" caching will still execute the query against the database but any 
returned rows that have previously been fetched will use a cached "decoded" 
geometry object instead of having to decode the database geometry to create 
the MapViewer internal geometry.  The Oracle ROWID is used as a "key" to 
identify previously fetched geometries (like the Postgres OID).

"All" caching will fetch the entire table out of the database the first time 
it is requested (i.e - slow!) and from then on is used purely "in memory" so 
no requests to the database are made at all.  Obviously this can imply a lot 
of RAM (a 1 or 2gb in-memory cache is usual, depending on layer size).  If 
your data is large, and static, then this can lead to fantastically fast 

Additionally there is a request that can be made to the server to clear the 
cache if required.

I guess Oracle has it's ROWID, PostgreSQL the OID - what about Shape and the 
other formats?  Do they all have suitable "keys" that could be used for 
feature identification?  The approach of caching geometry, as opposed to 
images, means that individual requests don't need to be *identical* to take 
advantage of the cache.

Hope this is of some use.... MapServer is a great product, my thanks to all 
developers past and present!

Steve H

----- Original Message ----- 
From: "Kyle Mulka" <kmulka at GLC.ORG>
Sent: Friday, August 05, 2005 4:01 PM
Subject: Re: [UMN_MAPSERVER-DEV] Image Caching, when to update?

> Sean Gillies wrote:
> "IMO, MapServer should remain focussed on rendering map images, and 
> caching
> should be left to other specialized applications or modules."
> If that's the case, that you don't want image caching built into 
> mapserver,
> maybe we need a component in the overall system, between mapserver and the
> WMS interface to deal with the issues of caching geographical imagery.
> Even if you don't do image caching, I believe caching of some things
> internally would be beneficial in mapserver so it can run faster. If
> mapserver was fast enough, I wouldn't even have to worry about image
> caching.
> I'm just trying to brainstorm here where this image caching system should 
> go
> and how it should work.
> -Kyle Mulka

More information about the mapserver-dev mailing list