Greg Ederer wrote: > Hi, > > My automated data updater is nearly finished. One thing I still need to do > is wipe the GeoWebCache for a layer when either the backing file or the > default style has changed. I am injecting my updater Spring bean with a > reference to the running GeoServer instance. Is there a convenient way to > traverse the object graph from the GeoServer object in order to get the paths > to the GEOSERVER_DATA_DIR (which always contains the styles directory) and > the GWC directory (which could be somewhere else)? >
What version of GeoServer are you using? Arne just last week implemented code on 2.0.x and trunk to automatically expire a GWC Cache based on a change in style or a wfs-t transaction. See http://svn.codehaus.org/geoserver/branches/2.0.x/src/gwc/src/main/java/org/geoserver/gwc/GWCCatalogListener.java http://svn.codehaus.org/geoserver/branches/2.0.x/src/gwc/src/main/java/org/geoserver/gwc/GWCTransactionListener.java You probably could just use his cleanser class and have it listen to your updater. It uses GWC classes directly to delete the cache. http://svn.codehaus.org/geoserver/branches/2.0.x/src/gwc/src/main/java/org/geoserver/gwc/GWCCleanser.java > BTW, this automated updating feature is going to be a huge time-saver for the > maintainers of our application. We have large volumes of time series data > that get updated frequently. My updater is configured using an XML file with > a section for each dataset. The updater scans the data directories once per > minute, and adds a store and layer for any new data files that it finds. > > Currently, the updater relies on our file-naming convention to pull temporal > information from the file name. But, this could be generalized by putting > regexes in the XML configuration file. Might this make a good community > module? > This would make a _great_ community module. GeoSolutions did some similar work, but I don't think it ever got to a community module. Perhaps there could be some collaboration. But I think it's a pretty common, that people would appreciate a solution to. I imagine there are quite a few interesting directions one could take it, but in general being able to listen to a file system for updates is pretty powerful. best regards, Chris > Thanks! > > Greg > ------------------------------------------------------------------------------ > Join us December 9, 2009 for the Red Hat Virtual Experience, > a free event focused on virtualization and cloud computing. > Attend in-depth sessions from your desk. Your couch. Anywhere. > http://p.sf.net/sfu/redhat-sfdev2dev > _______________________________________________ > Geoserver-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/geoserver-devel -- Chris Holmes OpenGeo - http://opengeo.org Expert service straight from the developers. ------------------------------------------------------------------------------ Join us December 9, 2009 for the Red Hat Virtual Experience, a free event focused on virtualization and cloud computing. Attend in-depth sessions from your desk. Your couch. Anywhere. http://p.sf.net/sfu/redhat-sfdev2dev _______________________________________________ Geoserver-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-devel
