Oracle True Cache is an in-memory, consistent, and automatically managed SQL and object cache for Oracle Database. It offers a powerful solution for data caching in enterprise environments, effectively addressing challenges posed by growing data volumes and the need for real-time access. By improving application response times and reducing database server loads, it helps organizations achieve reliable, low-latency data access for critical applications. True Cache is built with scalability and performance as core principles to meet the demands of modern enterprise systems.
Benefits of True Cache
Oracle True Cache provides several business benefits related to application development and performance.
- Improves scalability and performance by offloading queries from the primary database.
- Reduces application response time and network latency by deploying True Cache closer to the application. This especially benefits situations where a database is in a different location than the application due to data residency requirements.
- Creates a large, in-memory storage area by dividing data across multiple True Caches. The total size of the cached data across all True Caches can be much larger than it would be for a single primary database or cache.
- Automatically maintains the cache contents.
- Simplifies development and maintenance by being transparent to the application
Can True Cache continue to serve reads even if the primary database goes down?
When thinking about a cache, performance and low latency are usually the primary considerations. In addition to these benefits, Oracle True Cache is designed to support read availability for applications, even in scenarios where the primary database becomes unavailable.
Enterprise environments often require that applications continue to function during database outages, whether planned or unplanned. True Cache helps address this need by enabling applications to continue accessing previously cached data, supporting continuity for critical read operations.
This article focuses on read availability in the event of primary database unavailability. Another aspect of availability is the ability to deploy multiple True Cache nodes for a single primary database. In such configurations, if one cache node becomes unavailable, others can continue serving requests. This scenario will be covered in a separate article.
Normal Operation of True Cache (when Primary is operational)
First, let’s see how True Cache works when the primary database is up and running.

The application issues read queries to True Cache. If the data blocks are not already in True Cache, they are automatically fetched from the primary database, stored in the memory of True Cache and then served to the application. From that point onwards, the data blocks are kept in sync with the primary database automatically. Applications do not have to worry about stale data in cache, since all of this is automatically managed by True Cache. Also, all reads to True Cache are consistent and True Cache manages data consistency and data integrity while serving the application.
Warm-up of True Cache
A cache hit occurs when the system successfully retrieves data from its cache memory (in this case from True Cache). For this to happen, the data must have already been present in the cache and hence can be accessed quickly. This is the preferred scenario and enables the benefits of the cache to boost application performance. This can also help offload queries and reduce the number of requests to a primary database.
As True Cache starts receiving requests, the cache gradually fills up with frequently accessed data, transitioning from cold to warm and eventually hot as the cache becomes more efficient.
Before the system is exposed to real application traffic, it is good practice to proactively load frequently accessed data into the cache. This cache warming is a concept which is used to optimize the performance of the application by preloading the cache with frequently accessed content. By doing this, the data is readily available in True Cache, reducing the time it takes to serve it to the application/user. This results in a faster and more efficient user experience.
True Cache provides features for Cache Warmup and in steady state, deployments often aim for a high cache hit ratio (for example, >99%), depending on workload characteristics.
What happens when the primary database becomes unavailable?

The short answer is that True Cache continues to serve reads for the application. And, in the steady state where the cache is well warmed up and most all data that the application needs for its critical read paths are already in True Cache, this is a big help in ensuring smooth read access for the app.
Now – how does this work in practice, and do you need any settings for this?
What you need is for the machine/node that hosts True Cache, you need greater than 256GB memory provisioned for the SGA (of True Cache node). Of course – more memory for True Cache the better and the correct sizing of True Cache is to be done as part of the system design. But the minimum you need for the SGA is 256 GB. And that is it, the rest all is automatically taken care of for you by True Cache.
True Cache automatically keeps the necessary metadata (obtained from the primary database) in its system, that is needed to serve the reads from the application even when the primary database is down. The application can continue to read data that is cached in True Cache seamlessly, even if the primary database goes down.
What happens when the application issues a read which needs data from data blocks that is not in True Cache?
These read queries will return an error: OCI-61857 (indicating that communication with the primary database failed).
Summary
Oracle True Cache provides seamless operation to serve reads from cached data even when the primary database goes down. This can be beneficial during both unplanned outages and planned maintenance events. This capability is provided out of the box with True Cache and helps support High Read Availability for Enterprise Applications.
Resources:
Oracle True Cache Homepage: https://www.oracle.com/truecache
Oracle True Cache User’s Guide: True Cache User’s Guide
Oracle Live Labs Workshop for True Cache: Live Labs for True Cache
