Skip to content

[FEATURE] Cache Management APIs #35190

@hassandotcms

Description

@hassandotcms

Problem

Cache management (flushing caches, viewing region names, viewing cache statistics) is currently only accessible via JSP. The cache region dropdown is populated by a JSP scriptlet calling CacheLocator.getCacheIndexes(). Cache statistics (JVM memory + per-provider per-region hit/miss rates) are rendered by cachestats_guava.jsp. Flushing a specific cache region uses a Struts form POST to ViewCMSMaintenanceAction._flush(). Need REST endpoints to answer "What's in cache and how do I flush it?"

Goal

Provide REST endpoints for listing cache region names, viewing cache statistics, and flushing cache regions with proper side effects (permission reset, PushPublishing filter reload).

APIs

  • GET /v1/caches — List cache region names for selection
  • GET /v1/caches/stats — Cache statistics with JVM memory and per-region hit/miss rates
  • DELETE /v1/caches/{regionName} — Flush specific region or all caches

Personas

  • Developer Teams — Need REST APIs for Angular Cache tab
  • System Administrators — Need to monitor cache health and flush caches when troubleshooting

Legacy Reference

  • JSP: view_cms_maintenance.jsp lines 1327–1427 (Cache tab)
  • JSP: cachestats_guava.jsp (cache stats rendering)
  • Struts Action: ViewCMSMaintenanceAction._flush() lines 273–280
  • Target Class: CacheResource.java (/api/v1/caches)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions