[FEATURE] Cache Management APIs
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 970
- Forks
- 486
- Avg merge
- 3d 33m
- Merged PRs (30d)
- 170
Description
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 selectionGET /v1/caches/stats— Cache statistics with JVM memory and per-region hit/miss ratesDELETE /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.jsplines 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)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with CacheResource.java at /api/v1/caches, then compare the cache behavior in view_cms_maintenance.jsp, cachestats_guava.jsp, and ViewCMSMaintenanceAction._flush(). Implement the three listed endpoints for region names, JVM and per-region statistics, and flushing, including the stated permission reset and PushPublishing filter reload side effects. Done means the REST APIs support the Angular Cache tab and administrator troubleshooting needs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100