dotCMS / dotCMS/core

[TASK] Fix flush-all endpoint missing side effects

Open Beginner friendly
#35,198 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

stale Team : Modernization
Dominant language
Java
Stars
970
Forks
486
Avg merge
3d 33m
Merged PRs (30d)
170

Description

Description

Modify the existing DELETE /v1/caches/provider/{provider}/flush endpoint in CacheResource.java to add missing side effects. Currently it only calls MaintenanceUtil.flushCache() but the JSP Struts action also resets permission references and reloads PushPublishing filters after flushing all caches.

Acceptance Criteria
  • After calling MaintenanceUtil.flushCache(), endpoint must also call APILocator.getPermissionAPI().resetAllPermissionReferences()
  • After calling MaintenanceUtil.flushCache(), endpoint must also call DotInitializer.class.cast(APILocator.getPublisherAPI()).init() to reload PushPublishing filters
  • Existing behavior (flushing all caches) must not change
  • Existing response format must not change
Priority

None

Additional Context
  • Current implementation: CacheResource.java line 338, flushAll() method
  • Only consumer is a Postman test collection — no breaking change risk
  • The Struts action (ViewCMSMaintenanceAction._flush()) always calls resetAllPermissionReferences() and conditionally reloads PushPublishing filters — the REST endpoint was missing both

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in CacheResource.java at line 338, in the flushAll() method, and compare its behavior with ViewCMSMaintenanceAction._flush(). Verify the existing Postman test collection for the DELETE /v1/caches/provider/{provider}/flush endpoint, then confirm the permission references and PushPublishing filters are reloaded after cache flushing without changing the response format.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
74/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.