Package com.skava.web
Class CacheController
java.lang.Object
com.skava.web.CacheController
This controller class contains service end-point that are used to perform cache clear by name and its key or by
using cache name alone or by clearing all the cache.
- Author:
- Infosys Equinox
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThis method is used to clear all the cache.cacheClearByName
(String cacheName) This method is used to clear the cache by its name.cacheClearByNameAndKey
(String cacheName, String cacheKey) This method is used to clear the cache by its name
-
Constructor Details
-
CacheController
public CacheController()Default Constructor
-
-
Method Details
-
cacheClear
This method is used to clear all the cache.- Returns:
- The cache clear success response.
-
cacheClearByName
@GetMapping("/cache/clear/{cacheName}") public String cacheClearByName(@PathVariable(value="cacheName",required=true) String cacheName) This method is used to clear the cache by its name.- Parameters:
cacheName
- Indicates the cache name which is used for clearing the cache.- Returns:
- The cache clear success response.
-
cacheClearByNameAndKey
@GetMapping("/cache/clear/{cacheName}/{cacheKey}") public String cacheClearByNameAndKey(@PathVariable(value="cacheName",required=true) String cacheName, @PathVariable(value="cacheKey",required=true) String cacheKey) This method is used to clear the cache by its name- Parameters:
cacheName
- Indicates the cache name which is used for clearing the cache.cacheKey
- Indicates the cache key which is used for clearing the cache by its key.- Returns:
- The cache clear success response.
-