Package com.skava.cart.web
Class CacheClearController
java.lang.Object
com.skava.cart.web.CacheClearController
The CacheController.
This class is used to control the cache API operations.- Since:
- 2019-02-14
- Version:
- 8.2.0
- Author:
- Infosys Equinox
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<CartResponse>
This service end-point is used to clear the cache by collection id/cache key.
-
Constructor Details
-
CacheClearController
public CacheClearController()
-
-
Method Details
-
clearCache
@ResponseStatus(ACCEPTED) @DeleteMapping("/cache/clear") @PreAuthorize("hasRoleByName(\'ROLE_CART_ADMIN\')") @Audit(action="clearCache") public org.springframework.http.ResponseEntity<CartResponse> clearCache(@RequestParam(value="locale",required=false,defaultValue="en_US") String locale, @RequestHeader(value="x-auth-token",required=true) String authToken, @RequestHeader(value="x-version-id",required=false) String versionId, @RequestParam(value="cacheName",required=false) String cacheName, @RequestParam(value="id",required=false) Long id) This service end-point is used to clear the cache by collection id/cache key. Cache key is used to clear the specific cache in a collection and collection id is used to delete the cache of a collection.- Parameters:
locale
- API Response and error messages will be responded in the mentioned locale.authToken
- This field holds a valid authorization token generated using the Authorization micro service for an user.Auth token (JWT format) represents claims containing roles and privileges of the user accessing this API. JSON Web Token.versionId
- Holds the value of an API version number.cacheName
- Holds the cache name of a cache to be cleared.id
- Holds the cart id value to be cleared.- Returns:
- the instance of
ResponseEntity
ofCartResponse
object.
-