-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make LayerGroupContainmentCache available only on required services
`LayerGroupContainmentCache` can incur in quite a performance penalty during startup, as it'll get all layer groups and the layers/groups they're linked to. `LayerGroupContainmentCache` is a securtity subsystem aid only used by WMS. This patch contributes a no-op implementation or a customized one depending on the value of the `geoserver.security.layergroup-containmentcache` boolean config property, which is set to `true` in the default config's `geoserver.yml` for the `wms`, `gwc`, and `webui` services. Additionally, the customized `LayerGroupContainmentCache` implementation avoids re-creating the cache multiple times during startup. The original implementation does it at the class constructor and on a `ContextRefreshedEvent` event. Now, this event is triggered on any `ApplicationContext` refreshed, which for our spring boot services was being triggered three times: for the app context itself, the servlet context, and the actuator context. Now we make sure the cache is built only when the root application context is refreshed.
- Loading branch information
Showing
6 changed files
with
903 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.