Skip to content

Improve performance by enabling caching

miguelperezcolom edited this page Aug 5, 2024 · 1 revision

Mateu uses reflection for inferring the UI. Even though the computing cost is almost negligible, we can easily avoid some cpus cycles and save some milliseconds by adding the @EnableCaching annotation to our spring boot application.

@SpringBootApplication
@EnableCaching // <-- add this annotation to save some cpu cycles
public class DemoApplication {

  public static void main(String[] args) {
    SpringApplication.run(DemoApplication.class, args);
  }

}

Mateu methods are annotated with the @Cacheable annotation here and there, wherever it makes sense.

Clone this wiki locally