Description
Implement DELETE /v1/caches/{regionName} in CacheResource.java for the Maintenance portlet Cache tab. Flushes a specific cache region across all providers, or flushes all caches when "all" is passed. Must include the permission reset and PushPublishing filter reload side effects that the existing Struts action performs.
Acceptance Criteria
- API caller must be able to flush a specific cache region by name (e.g.,
velocityCache, Permission)
- Flush must clear the region across ALL providers via
CacheLocator.getCache(name).clearCache(), not just a single provider
- API caller must be able to flush all caches by passing
all as the region name
- When flushing all caches, endpoint must call
MaintenanceUtil.flushCache()
- Endpoint must always call
APILocator.getPermissionAPI().resetAllPermissionReferences() after flushing
- When flushing "all" or "system" region, endpoint must reload PushPublishing filters via
DotInitializer.class.cast(APILocator.getPublisherAPI()).init()
- API caller must receive a message indicating what was flushed
- Must require backend user with Maintenance portlet access
Priority
None
Additional Context
- Existing
DELETE /v1/caches/provider/{p}/flush/{group} is NOT suitable — it flushes in a single provider only and its URL contract is provider-specific
- The Struts action logic is in
ViewCMSMaintenanceAction._flush() (lines 273–280) and the caller at lines 171–186
- The
CacheLocator.getCache("all") throws NPE which triggers the flushAll path — replicate this behavior
Description
Implement
DELETE /v1/caches/{regionName}inCacheResource.javafor the Maintenance portlet Cache tab. Flushes a specific cache region across all providers, or flushes all caches when "all" is passed. Must include the permission reset and PushPublishing filter reload side effects that the existing Struts action performs.Acceptance Criteria
velocityCache,Permission)CacheLocator.getCache(name).clearCache(), not just a single providerallas the region nameMaintenanceUtil.flushCache()APILocator.getPermissionAPI().resetAllPermissionReferences()after flushingDotInitializer.class.cast(APILocator.getPublisherAPI()).init()Priority
None
Additional Context
DELETE /v1/caches/provider/{p}/flush/{group}is NOT suitable — it flushes in a single provider only and its URL contract is provider-specificViewCMSMaintenanceAction._flush()(lines 273–280) and the caller at lines 171–186CacheLocator.getCache("all")throws NPE which triggers the flushAll path — replicate this behavior