Verify Autorefresh of Static Read-Only Cache Group
The following shows how changes are automatically updated to the read-only cache group.
The example in this section inserts a new row, deletes an existing row, updates an existing row in the customers
cache table, and commits the changes on the Oracle database.
-
On the Oracle database, use SQL*Plus as the Oracle database schema user
sales
to insert a new row, delete an existing row, update an existing row in the Oracle databasecustomers
table, and commit the changes.SQL> INSERT INTO customers VALUES (342, "West", "Jane Stone"); 1 row created. SQL> DELETE FROM customers WHERE cust_num=122; 1 row deleted. SQL> UPDATE customers SET region="East" WHERE cust_num=663; 1 row updated. SQL> COMMIT; Commit complete.
Since the read-only cache group was created with the default setting for autorefresh with an interval of 5 minutes, the
sales.customers
cache table in thecustomer_orders
cache group is automatically refreshed after 5 minutes with the committed changes on the cached Oracle Databasesales.customers
table. -
On the TimesTen instance as the TimesTen cache administration user, use the
ttIsql
utility to query the contents of thesales.customers
cache table after thecustomer_orders
cache group has been automatically refreshed with the committed changes on the cached Oracle database table:Command> SELECT * FROM sales.customers; < 342, West, Jane Stone > < 663, East, Pat Reed > 2 rows found. Command> exit; Disconnecting... Done.
Since this is a quick guide on how to create a static read-only cache group, see Cache Concepts and Read-Only Cache Group in the Oracle TimesTen In-Memory Database Cache Guide for a more thorough understanding of the concepts behind and the options for a static read-only cache group.