14.2.8 The Caches Endpoint

The caches endpoint returns information about the caches in the application and permits invalidating them.

To get a collection of all caches by name with their configuration, send a GET request to /caches.

  1. $ curl http://localhost:8080/caches

To get the configuration of a particular cache, include the cache name in your GET request. For example, to access the configuration of the cache ‘book-cache’:

  1. $ curl http://localhost:8080/caches/book-cache

To invalidate all cached values within a single cache, send a DELETE request to the named cache URL.

  1. $ curl -X DELETE http://localhost:8080/caches/book-cache

To invalidate all caches, send a DELETE request to /caches.

  1. $ curl -X DELETE http://localhost:8080/caches