Class SiteCacheRestController
- java.lang.Object
-
- org.craftercms.core.controller.rest.RestControllerBase
-
- org.craftercms.engine.controller.rest.SiteCacheRestController
-
@RestController @RequestMapping("${crafter.core.rest.base.uri}/site/cache") public class SiteCacheRestController extends org.craftercms.core.controller.rest.RestControllerBase
REST controller for operations related to a site's cache.- Author:
- Alfonso Vásquez
-
-
Constructor Summary
Constructors Constructor Description SiteCacheRestController(String configuredToken)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,Object>
clear(javax.servlet.http.HttpServletRequest request, String token)
org.craftercms.core.cache.CacheStatistics
getStatistics(String token)
protected void
validateToken(String requestToken)
-
-
-
Field Detail
-
URL_ROOT
public static final String URL_ROOT
- See Also:
- Constant Field Values
-
URL_CLEAR
public static final String URL_CLEAR
- See Also:
- Constant Field Values
-
URL_STATS
public static final String URL_STATS
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SiteCacheRestController
@ConstructorProperties("configuredToken") public SiteCacheRestController(String configuredToken)
-
-
Method Detail
-
clear
@RequestMapping(value="/clear", method=GET) public Map<String,Object> clear(javax.servlet.http.HttpServletRequest request, @RequestParam String token) throws org.craftercms.commons.exceptions.InvalidManagementTokenException
- Throws:
org.craftercms.commons.exceptions.InvalidManagementTokenException
-
getStatistics
@RequestMapping(value="/statistics", method=GET) public org.craftercms.core.cache.CacheStatistics getStatistics(@RequestParam String token) throws org.craftercms.commons.exceptions.InvalidManagementTokenException
- Throws:
org.craftercms.commons.exceptions.InvalidManagementTokenException
-
validateToken
protected final void validateToken(String requestToken) throws org.craftercms.commons.exceptions.InvalidManagementTokenException
- Throws:
org.craftercms.commons.exceptions.InvalidManagementTokenException
-
-