What Is Caching in a Semantic Layer?
Caching means storing copies of data in a temporary location. This helps speed up future requests for the same data. In a semantic model, the results of frequently run queries are saved. These results are stored based on the meaning or context of the query. When a similar or identical query is run again, the model can use this cached data to respond faster.
The main goal of caching is to speed up data retrieval and improve query performance. As users run queries, the cache stores their results. If the same query is run later, the results come directly from the cache. This avoids accessing the original data source again.
Within the semantic layer, caching reduces how often the system reaches out to the data source. There are no external caching layers involved. This keeps the data in one place. It also allows the system to scale based on the cloud platform in use.
As a result, query processing becomes more efficient. System resources are used better and overall performance improves. Kyvos supports several caching methods to help build and use semantic models faster and more accurately.
What Are the Types of Caching in Kyvos?
The caching mechanism speeds up data retrieval. It does this by skipping slower data storage and accessing data directly from in-memory storage. The cache loads data during system boot-up. It then syncs with the main repository every 15 minutes.
The cache is also updated or cleared when the underlying database changes. This ensures that users always get up-to-date results. With extensive caching, the system greatly improves query performance. It also makes better use of system resources.
Kyvos uses caching across multiple layers and modules. Here are the different types of cache available in Kyvos:
BI Server Caching
The BI server cache stores pre-computed queries and static information, such as user permissions. It includes data that doesn’t change frequently. Since static data doesn’t take up much space, it fits well in this cache.
The cache holds pre-computed results of all past queries. If a similar query is run again, the BI server fetches the result directly from the cache. It doesn’t send the query to the query engine. If the query is new, the BI server forwards it to the query engine for processing.
The BI server cache handles both static and dynamic data. It includes several types of caches:
-
Entity Cache: Stores information about datasets, relationships, semantic models, worksheets and workbooks. This in-memory cache prevents repeated hits on the repository. It’s populated during BI server boot-up and updates automatically whenever an entity is created, modified, or deleted.
-
Folder Cache: Caches related entities grouped in folders. It updates dynamically when any folder’s state changes. This cache speeds up folder management and improves data access.
-
Entity Properties Cache: Stores performance-related properties of entities. This makes accessing configuration settings faster and easier.
-
Users’ Cache: Stores user details such as usernames, permissions and group memberships. It allows faster security checks without performance delays.
-
Group Cache: Holds group-level information. This supports batch operations and simplifies managing multiple users.
-
Access Rights Cache: Stores permissions for all shareable entities. This cache loads at boot-up and defines who can view, modify, or access each entity.
-
Data Security Rules Cache: Holds rules that control access to specific data points. Instead of checking the repository, the BI server reads from this cache. This way it maintains fast browsing performance.
-
Cuboid Distribution Cache: Caches metadata about cuboids. This metadata includes dimensions, measure sets, query engine locations and filtering rules. This speeds up how the system handles browsing requests.
-
Result Cache: Stores results of previously executed queries. This reduces the processing and network transfer costs for high-cardinality data. The cache helps avoid reprocessing and enhances overall query performance.
Query Engine Caches
The query engine cache optimizes system performance and improves query response times. When a user runs a query, it is first sent to the BI server. The server checks whether the query has already been run before.
If the query exists in the cache, the BI server or result cache serves the response immediately. If not, the query is sent to the query engine for processing.
The system checks the fastest available caches first. This speeds up data retrieval. With multiple cache layers, the system ensures efficient performance in a cascading manner.
There are several types of caches within the query engine:
-
Look Ahead Cache: Each query uses data blocks multiple times. This cache keeps a single cuboid block in memory during the entire query. Since the block is already in memory, it doesn’t need to be read from disk or decompressed repeatedly. This greatly improves query speed.
-
MOLAP Semantic Model Cache: This cache holds metadata about the MOLAP semantic model. This includes all dimensions, measures and hierarchies. Initializing this metadata takes time and memory. So, the system stores it once in the cache. This speeds up browsing and removes the need to reinitialize the model for every session.
-
Cuboid Blocks Cache: Frequently accessed cuboid data blocks are stored in off-heap memory. As queries access these blocks, the cache updates automatically. This ensures faster data retrieval and improves overall query performance.
Why Caching Matters in the Semantic Layer?
Caching plays a critical role in making semantic models faster and efficient. By storing frequently accessed data and metadata in memory, it eases the load on query engines and underlying databases. This not only improves response times but also optimizes system resources.
Kyvos’ multi-layered caching approach enables access to both static and dynamic data in near real-timewithout compromising performance or accuracy. From user permissions to data blocks, everything is intelligently cached to support faster browsing, lower latency and improved scalability.
As data keeps growing and users expect instant answers, intelligent caching becomes more than just a performance boost—it’s fundamental to delivering consistent, responsive analytics at scale.