June 2017
Intermediate to advanced
496 pages
14h 4m
English
The next step is to add the caching annotations, indicating when something needs to be added or removed from the cache. The following snippet shows an example:
@Component public class ExampleRepository implements Repository { @Override @Cacheable("something-cache-key") public Something getSomething(String id) { //Other code } }
Some of the annotations that are supported are as follows:
Read now
Unlock full access