Source: dzone.com

Spring Batch and Caching

Category: Database, Data

by Today, in this tutorial we'll learn how to implement the Caching in the Spring Batch. There are numerous scenarios where we always need to get the data from a database based on some conditions either at Spring Batch Processor, Tasklet, or Writer for each record and calling database to get that data could be performance-centric and could often increase the load on the database.

In this example, before launching the Job JobExecutionListener interface which can read data from Relational database or CSV file or XML file or any NoSQL database and stores the data into the cacheManager.

Opinions expressed by DZone contributors are their own.

Related Articles