Repository navigation
Description
Description
Currently MS is invoking a wrong base URL for invalidating the GF cache:
https://host/MapStore2/rest/geofence/ruleCache/invalidate
It should be something like as the cache rule is on the GS side:
https://host/geoserver/rest/geofence/ruleCache/invalidate
Rulemanager and the api code here are not considering multiple instances
MapStore2/web/client/api/geoserver/GeoFence.js
Lines 180 to 192 in de55770
| addBaseUrlGS: function(options = {}, gsInstanceURL) { | |
| // in case of stand-alone geofence, use gsInstanceURL | |
| const isStandAloneGeofence = Api.getRuleServiceType() === 'geofence'; | |
| let {url: baseURL} = ConfigUtils.getDefaults().geoFenceGeoServerInstance || {}; | |
| if (isStandAloneGeofence && gsInstanceURL) { | |
| baseURL = gsInstanceURL; | |
| } | |
| // ensure URL ends with a slash to prevent path issues | |
| if (baseURL) { | |
| baseURL = baseURL.endsWith("/") ? baseURL : baseURL + "/"; | |
| } | |
| return Object.assign(options, {baseURL}); | |
| }, |
the migration guideline is good
in case of multiple instances the baseUrl here is undefined ending up in the error above
https://github.com/geosolutions-it/MapStore2/blob/master/web/client/api/geoserver/GeoFence.js#L191
ACs
When clicking clear cache we:
- list in a menu item all instance names
- clicking on an instance will open the modal
- the modal will tell which instance you are clearing cache
- click on confirm will delete cache on that instance only
- EXTRA add a voice in menu list that is called "clear all"
- when clicked it will open the modal
- it will show a message that will state "Do you want to clear cache of all geoserver instances?
- if confirm an invalidate must be sent with correct url (/MapStore2 is not present)
What kind of improvement you want to add? (check one with "x", remove the others)
- Minor changes to existing features
- Code style update (formatting, local variables)
- Refactoring (no functional changes, no api changes)
- Build related changes
- CI related changes
- Other... Please describe:
Activity
#12271: Rules manager - clear cache on standalone geofence and multip…
MV88 commentedon Apr 22, 2026
@ElenaGallo testable in DEV
ElenaGallo commentedon Apr 22, 2026
@tdipisa The multiple instances feature is not enabled on MS Dev so this fix can not be tested. I will go test it in the client’s environment. ok?
[Backport C040-2025.02.xx] #12271: Rules manager - clear cache on sta…
#12271: Rules manager - clear cache on standalone geofence and multip…
#12271: Rules manager - clear cache on standalone geofence and multip…
geosolutions-it#12271: Rules manager - clear cache on standalone geof…
Add Portuguese (pt-PT) translation (#12236)
Update to upstream v2026.01.02 (#77)