CachingCatalogFacade and CachingGeoServerFacade initialization and life cycle
handler, to enable caching during normal operation and disable it during
maintenance operations such as configuration initialization and reloading.
Some methods in the caching decorators may cache null return values (for instance,
CachingGeoServerFacade#getService(Class) and others), which is very valuable during
normal GeoServer operation as such methods may be called several times per request.
Yet, it can be inconvenient during catalog and config maintenance operations, when,
for example, a GeoServerLoader checks for the existence of default or required
objects. If a cached null value is returned, multiple GeoServer instances may
attempt to create the same default objects (like for ServiceInfos).
For that reason, this GeoServerReinitializer and GeoServerLifecycleHandler
listener disables caching before configuration operations on beforeReinitialize()beforeReload(), and enables caching afterwards at initialize(GeoServer) and onReload().
CachingCatalogFacade
andCachingGeoServerFacade
initialization and life cycle handler, to enable caching during normal operation and disable it during maintenance operations such as configuration initialization and reloading.Some methods in the caching decorators may cache
null
return values (for instance,CachingGeoServerFacade#getService(Class)
and others), which is very valuable during normal GeoServer operation as such methods may be called several times per request.Yet, it can be inconvenient during catalog and config maintenance operations, when, for example, a
GeoServerLoader
checks for the existence of default or required objects. If a cachednull
value is returned, multiple GeoServer instances may attempt to create the same default objects (like forServiceInfo
s).For that reason, this
GeoServerReinitializer
andGeoServerLifecycleHandler
listener disables caching before configuration operations onbeforeReinitialize()
beforeReload()
, and enables caching afterwards atinitialize(GeoServer)
andonReload()
.