Caching in Information Systems Based on Command Query Responsibility Segregation Design Pattern

Krešimir Kavran, Ivana Rakarić · 2025

Information systems in the business domain use databases to store data. Depending on the design pattern, information systems can use one or more databases. In the case of multiple databases, the purpose of each database instance can be different. Regardless of configuration, databases contain the data necessary for all operations. To reduce the number of reads to the databases and to reduce the number of recalculations, solution architects and developers use caching. In the information system based on the Command Query Responsibility Segregation design pattern, there are more options per component for implementing caching. The Command Query Responsibility Segregation design pattern plays a crucial role in caching. It allows for the separation of read and write actions, facilitating the creation of distinct cache mechanisms and the storage of different values for each type of action or component. This paper presents a practical implementation of caching in an information system based on the Command Query Responsibility Segregation design pattern. The presented caching solution allows the usage of multiple cache storages for various modules of the information system and facilitates data synchronization between modules and simplifies the process of adding or modifying features, enhancing the system's flexibility and scalability.

Read the paper · More papers on PaperTik