Oracle True Cache is an in-memory, consistent, and automatically managed SQL cache for Oracle Database. It operates seamlessly within your database environment, efficiently storing frequently accessed information to dramatically improve application response times. By shouldering the load of repetitive data requests, Oracle True Cache effectively reduces strain on the database server. Its automated management and unwavering consistency streamline application development, offering a cost-effective and simplified approach for developers.
Oracle True Cache provides several business benefits related to application development and performance.
At a high level, here's how Oracle True Cache works.
True Cache is empty when it starts up, so it reads large chunks of data to populate the cache.
After a block is cached, it's automatically updated through redo apply from the primary database. This is similar to the update mechanism used in Oracle Active Data Guard.
True Cache offers the capability to pin specific tables and data sets within the cache. This ensures that crucial data remains intact, even under memory constraints or least recently used (LRU) algorithms. Pinned data is automatically refreshed in real time as changes occur on the primary database, maintaining consistency and reliability.
True Cache can scale by leveraging the concept of services. For instance, you can define two services, one for the sales department and another for HR. All requests for the sales service will be directed to one cache, while requests for HR will be routed to another cache. Because the data for each service is distinct, with different tables and data structures, scaling True Cache can be achieved effectively using the following approach. For example:
Set the TRUE_CACHE_SERVICE parameter using service names that correspond to the primary database application services. To distinguish the True Cache database application services, it's a good practice to use the primary service name followed by _TC. For example, if the primary service is SALES, the True Cache service would be SALES_TC.
Yes, colocation is possible using the COLOCATION_TAG feature, which allows data to be sent to True Caches in specific regions. For example, you might have two applications and two True Caches. Sessions with COLOCATION_TAG set to United States go to one True Cache (TCDB1I) and sessions with COLOCATION_TAG set to Europe go to the other True Cache (TCDB2I).
No, True Cache is a read-only cache, so you can't directly update the cache, but you can use DML redirection to indirectly update the cache. DML redirection writes data to the primary database and then that data is automatically updated in the cache. This is similar to how Oracle Active Data Guard works. Because DML redirection uses more resources, it's not recommended for update-intensive applications.
To enable DML redirection, set the ADG_REDIRECT_DML initialization parameter to TRUE on True Cache.
Oracle True Cache caches all Oracle Database objects and data types, including relational, JSON, text, spatial, graph, and vector data types. Data in True Cache can be accessed in a row or columnar format, ensuring compatibility and flexibility for diverse caching needs.
Smart client drivers refer to the Oracle JDBC driver's intelligent functionality, which automatically identifies the presence of True Cache. These drivers can discern between read-only and read-write requests, seamlessly routing read-only queries to the cache. This innovative feature streamlines application development by eliminating the need to manage separate connections for the primary database and the cache.
True Cache offers versatile deployment options, catering to various scenarios such as mid-tier cache, edge cache, cross-region cache, and cross-cloud cache configurations.
Oracle True Cache implements Oracle Database security policies. These include a wide array of protections such as at-rest data encryption, over-the-wire data encryption, row-level security, Oracle Database Vault, Oracle Key Vault, and thorough authentication and authorization mechanisms.
True Cache is available with Oracle Database 23ai and later versions. It is not supported in earlier releases.
Oracle True Cache is a feature available with Oracle Base Database Service.