[Geoserver-users] svg refresh in geoserver

Hallo,

I use svg files in my SLD. I show my data on a page : everything is just
right.

Then, I make some change in my svg file. I reload my page : I still see the
old svg (before change). I empty the browser cache : same thing. I need to
restart geoserver to see the "new" svg.

Is there another cache level on the server side ?

Thanks for your help,

Christian
--
View this message in context: http://www.nabble.com/svg-refresh-in-geoserver-tp20501497p20501497.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

kdu ha scritto:

Hallo,

I use svg files in my SLD. I show my data on a page : everything is just
right.

Then, I make some change in my svg file. I reload my page : I still see the
old svg (before change). I empty the browser cache : same thing. I need to
restart geoserver to see the "new" svg.

Is there another cache level on the server side ?

Yes, GeoServer loads all the external graphics once and keeps
them in memory. The cost to reload the SVG files for each request
would make using external graphics almost impossible in a real
production environment.

We'd need a smarter cache that checks the last modification date
or the files, unfortunately the files could be also over a HTTP
connection, and there we would have to check the proper http
headers each time... long story short, doing this properly is not
trivial, would require a few days of work.
If you're interested in contributing a patch in this direction I
can show you the way in the code. Or you can have this also done
by some commercial support providers, there is a page at
geoserver.org with a list of them

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

Hi,

thank your for your quick answer.

I would love to have an auto refresh of the external graphics files, but I
don't need anything as smart as this.

Just a "reload_external_graphics for layer xxx" request would already be
great.

One way to achieve this is to change and reload the SLD file AND ALSO
change the graphics file names.

Is there another way ?

One funny behavior :

I have A.SLD with the same graphics file G.SVG in three rules.
I have B.SLD which is A.SLD except that the 3rd rule use H.SVG.

I load A.SLD : I see my G.SVG on the maps.
I load B.SLD : I see H.SVG wherever applicable and G.SVG everywhere else.
I change the looks of G.SVG.
I load A.SLD : I see the the new G.SVG wherever I previously saw H.SVG but
I still see the old G.SVG everywhere else.

Overoptimized ?

(Embedded image moved to file: pic19801.jpg)

CONFIDENTIALITE : Ce message et les éventuelles pièces attachées sont
confidentiels. Si vous n'êtes pas dans la liste des destinataires, veuillez
informer l'expéditeur immédiatement et ne pas divulguer le contenu à une
tierce personne, ne pas l'utiliser pour quelque raison que ce soit, ne pas
stocker ou copier l'information qu'il contient sur un quelconque support.

CONFIDENTIALITY : This e-mail and any attachments are confidential and may
be privileged. If you are not a named recipient, please notify the sender
immediately and do not disclose the contents to another person, use it for
any purpose or store or copy the information in any medium.

             Andrea Aime
             <aaime@anonymised.com
             g> A
                                       kdu <christian.dupont@anonymised.com>
             14/11/2008 15:33 cc
                                       geoserver-users@anonymised.com
                                       et
                                                                     Objet
                                       Re: [Geoserver-users] svg refresh
                                       in geoserver
                                                                           
kdu ha scritto:

Hallo,

I use svg files in my SLD. I show my data on a page : everything is just
right.

Then, I make some change in my svg file. I reload my page : I still see

the

old svg (before change). I empty the browser cache : same thing. I need

to

restart geoserver to see the "new" svg.

Is there another cache level on the server side ?

Yes, GeoServer loads all the external graphics once and keeps
them in memory. The cost to reload the SVG files for each request
would make using external graphics almost impossible in a real
production environment.

We'd need a smarter cache that checks the last modification date
or the files, unfortunately the files could be also over a HTTP
connection, and there we would have to check the proper http
headers each time... long story short, doing this properly is not
trivial, would require a few days of work.
If you're interested in contributing a patch in this direction I
can show you the way in the code. Or you can have this also done
by some commercial support providers, there is a page at
geoserver.org with a list of them

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

pic05786.jpg