Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update transaction layer search by name handling #61

Merged

Conversation

pankajjangid05
Copy link
Contributor

Ticket: #59

Comment on lines 69 to 93
public ResponseEntity<Object> removeAll(@RequestHeader(name = "Authorization") String authorizationHeader) {
try {
if (authorizationKey.equals(authorizationHeader)) {
cache.asMap().keySet().forEach(key -> {
removeCache(key.toString());
});
log.info("All cache removed success");
Map<String, Object> map = new HashMap<>();
map.put("message", "Cache removed success");
map.put("status", "success");
return new ResponseEntity<>(map, HttpStatus.OK);
} else {
Map<String, Object> map = new HashMap<>();
map.put("message", "Unauthorized. Invalid secure key.");
map.put("status", "failed");
return new ResponseEntity<>(map, HttpStatus.UNAUTHORIZED);
}
} catch (Exception ex) {
log.error("CaffeineCacheController:removeAll: Error while removing cache : " + ex.getMessage());
Map<String, Object> map = new HashMap<>();
map.put("message", ex.getMessage());
map.put("status", "failed");
return new ResponseEntity<>(map, HttpStatus.INTERNAL_SERVER_ERROR);
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey these changes have been already incorporated by a separate PR. Could you rebase and update the PR?

@pankajjangid05 pankajjangid05 merged commit 931741d into samagra-comms:development Aug 3, 2023
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants