Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 
 Home
 E-mail Us
 Oracle Articles
New Oracle Articles


 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog


 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Analysis
 Design
 Implementation
 Oracle Support


 SQL Tuning
 Security

 Oracle UNIX
 Oracle Linux
 Monitoring
 Remote s
upport
 Remote plans
 Remote
services
 Application Server

 Applications
 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S
upport  
 Development  

 Implementation


 Consulting Staff
 Consulting Prices
 Help Wanted!

 


 Oracle Posters
 Oracle Books

 Oracle Scripts
 Ion
 Excel-DB  

Don Burleson Blog 


 

 

 


 

 

 
 

Putting Your Web Cache To Work: Cache Invalidation using PL/SQL

Oracle Tips by Burleson Consulting
14 April 2005
John Garmany

The Oracle Web Cache is a powerful tool and one that I see few organizations taking advantage of it ability to cache dynamic documents.

A dynamic document or object is one created from data and is valid only as long as the data does not change.

It's the "does not change" part that makes caching dynamic objects difficult.  It of course takes planning  in both your application development and database model.

While you still have to determine when an object is no longer valid, Oracle provides some simple tools to perform the actual cache invalidation. 

The Web cache listens on an invalidation port (mine installed on 4002) for a simple HTTP POST message.  The message can come from a terminal, the application, or the database. 

In PL/SQL the WXVUTIL package contains the procedures to send an invalidation message to the web cache. 

First, the package must be loaded in the database.  It is provides in the webcache/toolkit directory.

<appsvr Oracle_Home>/webcache/toolkit/wxvutil.sql. 
 
[oracle@appsvr toolkit]$ pwd 
/opt/oracle/portal904/webcache/toolkit 
[oracle@appsvr toolkit]$ ls -l 
total 104 
-rw-r--r--    1 oracle   oinstall      672 Jul 11  2003 invalidation.dtd 
-rw-r--r--    1 oracle   oinstall    65389 Nov 12  2003 jawc.jar 
-rw-r--r--    1 oracle   oinstall       70 Jul 11  2003 README.toolkit.txt 
-rw-r--r--    1 oracle   oinstall     4348 Jul 11  2003 WCSinvalidation.dtd 
-rw-r--r--    1 oracle   oinstall     6083 Jul 11  2003 wxvappl.sql 
-rw-r--r--    1 oracle   oinstall    10757 Jul 11  2003 wxvutil.sql 
 

Notice this is the application server (or web cache if on a separate server) ORACLE_HOME, not the database ORACLE HOME.

After the scripts are run you can create triggers on the underlying tables of the dynamic objects.  When the database executes a DML operation on the table (INSERT, UPDATE or DELETE), the trigger invalidates the cached objects based on the table data.

CREATE OR REPLACE TRIGGER PRODUCT_INVALID_TRIG 
  AFTER DELETE OR INSERT OR UPDATE on PRODUCT FOR EACH ROW 
  BEGIN 
    wxvutil.invalidate_reset; 
    wxvutil.invalidate_uri('/MainApp/prod_list.jsp', 0,
                            null); 
    wxvutil.invalidate_exec('web.appsvr.com', 4002,
                            'oracie123'); 
END; 
/ 
 

You can invalidate a single object (as in the example above) or multiple objects.

wxvutil.invalidate_uri('/MainApp/prod_list.*', 0, null); 

 

 
Get the Complete
Oracle SQL Tuning Information 

The landmark book "Advanced Oracle SQL Tuning  The Definitive Reference"  is filled with valuable information on Oracle SQL Tuning. This book includes scripts and tools to hypercharge Oracle 11g performance and you can buy it for 30% off directly from the publisher.

 


 

 

��  
 
 
Oracle Training at Sea
 
 
 
 
oracle dba poster
 

 
Follow us on Twitter 
 
Oracle performance tuning software 
 
Oracle Linux poster
 
 
 

 

Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  

and include the URL for the page.


                    









Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


 

Copyright © 1996 -  2017

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.

Remote Emergency Support provided by Conversational