Skip to content

Commit

Permalink
Add deprecation warning for GET/POST/PUT cache (#4776)
Browse files Browse the repository at this point in the history
Signed-off-by: Derek Ho <[email protected]>
  • Loading branch information
derek-ho authored Oct 4, 2024
1 parent 3734dd9 commit 602dcf1
Showing 1 changed file with 15 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,21 @@ public class FlushCacheApiAction extends AbstractApiAction {
private static final List<Route> routes = addRoutesPrefix(
ImmutableList.of(
new Route(Method.DELETE, "/cache"),
new Route(Method.GET, "/cache"),
new Route(Method.PUT, "/cache"),
new Route(Method.POST, "/cache")
new DeprecatedRoute(
Method.GET,
"/cache",
"GET is not supported for /cache endpoint and will be removed in the next major version. Use DELETE instead."
),
new DeprecatedRoute(
Method.PUT,
"/cache",
"PUT is not supported for /cache endpoint and will be removed in the next major version. Use DELETE instead."
),
new DeprecatedRoute(
Method.POST,
"/cache",
"POST is not supported for /cache endpoint and will be removed in the next major version. Use DELETE instead."
)
)
);

Expand Down

0 comments on commit 602dcf1

Please sign in to comment.