File tree Expand file tree Collapse file tree
dotCMS/src/main/java/com/dotcms/rest/api/v1/system/cache
dotcms-integration/src/test/java/com/dotcms/rest/api/v1/system/cache Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111
1212import com .dotcms .rest .exception .BadRequestException ;
1313import javax .enterprise .context .ApplicationScoped ;
14- import java .util .Set ;
15- import java .util .stream .Collectors ;
1614import java .util .stream .Stream ;
1715
1816/**
@@ -71,17 +69,6 @@ public void flushAllCaches() {
7169 reloadPublishingFilters ();
7270 }
7371
74- /**
75- * Returns the set of valid cache region names derived from {@code CacheLocator.getCacheIndexes()}.
76- */
77- public Set <String > getValidRegionNames () {
78-
79- final Object [] caches = CacheLocator .getCacheIndexes ();
80- return Stream .of (caches )
81- .map (Object ::toString )
82- .collect (Collectors .toSet ());
83- }
84-
8572 private boolean isValidRegion (final String regionName ) {
8673
8774 final Object [] caches = CacheLocator .getCacheIndexes ();
Original file line number Diff line number Diff line change 66import com .dotcms .rest .ResponseEntityView ;
77import com .dotcms .rest .WebResource ;
88import com .dotcms .rest .annotation .NoCache ;
9- import com .dotcms .rest .annotation .SwaggerCompliant ;
109import com .dotmarketing .business .APILocator ;
1110import com .dotmarketing .business .CacheLocator ;
1211import com .dotmarketing .business .DotStateException ;
5352 * @author jsanca
5453 */
5554@ Path ("/v1/caches" )
56- @ SwaggerCompliant (value = "System maintenance APIs" , batch = 3 )
5755@ Tag (name = "Cache Management" , description = "Cache provider management and operations" )
5856public class CacheResource {
5957
Original file line number Diff line number Diff line change @@ -223,10 +223,10 @@ public void test_flushRegion_unknown_returns_400() {
223223 /**
224224 * Given: Valid region name "System"
225225 * When: flushRegion is called
226- * Then: Flushes successfully (System triggers PushPublishing reload)
226+ * Then: Flushes successfully (System region also triggers PushPublishing reload internally )
227227 */
228228 @ Test
229- public void test_flushRegion_system_triggers_publishing_reload () {
229+ public void test_flushRegion_system_returns_success () {
230230
231231 final ResponseEntityStringView result =
232232 cacheResource .flushRegion (
You can’t perform that action at this time.
0 commit comments