Overview of Oracle True Cache

Oracle True Cache is an in-memory, consistent, and automatically managed SQL and key-value (object or JSON) cache for Oracle AI Database.

For an interactive tour, see Oracle True Cache Technical Architecture.

About Oracle True Cache

True Cache is an in-memory, read-only cache in front of an Oracle AI Database.

Like Oracle Active Data Guard, True Cache is a fully functional, read-only replica of the primary database, except that it’s mostly diskless.

Modern applications often require a high number of connections and fast, low-latency access to the data. A popular approach is to place caches in front of the database because applications typically perform many more reads than updates, and they can read from the cache without affecting the database performance. For example, an airline reservation system reads data frequently as people shop for flights, and it’s okay if the data isn’t the most current compared to what’s in the database. The application only needs to access the most current data when someone reserves a flight.

Unlike conventional caches, True Cache automatically keeps the most frequently accessed data in the cache, and it keeps the cache consistent with the primary database, other objects in the same cache, and other caches. It caches all Oracle AI Database objects and data types, including JSON.

Because True Cache implements Oracle AI Database security policies, you can control access to the cache. This enables you to cache sensitive data, like private personal information, that you might not ordinarily cache.

Benefits of Oracle True Cache

Oracle True Cache provides several business benefits related to application development and performance.

How True Cache Works

At a high level, here’s how Oracle True Cache works.

Considerations for Using True Cache

Consider these points when deciding whether to use Oracle True Cache.

Application Usage Models

Applications can use True Cache in two ways.

Lock-Free Concurrency Control

For applications that work with JSON documents, Oracle extends HTTP entity tag (ETAG) support to implement lock-free, optimistic concurrency control.

A database GET request to True Cache automatically computes the ETAG and inserts it into the returned document. When the modified document is PUT back into the primary database, the following occurs:

  1. The database verifies that the underlying document rows still match the ETAG that was computed by the GET request.

  2. If the rows match the ETAG, the rows are atomically updated.

  3. If there’s not a match, another user has changed the data and the PUT request is rejected.

  4. The PUT request can be retried using the new data.