Spring Data Rest - Caching

后端 未结 1 1094
说谎
说谎 2021-01-01 04:41

How to enable caching with Spring Data Rest?

The reasoning behind is that repository listing and search methods won\'t change once the application is up. Also if the

1条回答
  •  萌比男神i
    2021-01-01 05:36

    The easiest way to implement this on the repository level is to use Spring's @Cacheable as it can be seen in the Spring Data JPA Examples project.

    Another option is to leverage HTTP Caching using the Apache HTTPD settings or a Varnish for example.

    0 讨论(0)
提交回复
热议问题