Oracle
  Home arrow Oracle arrow Generic Architecture for Caching Table...
Dev Shed Forums 
Administration  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Download TestComplete 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
ORACLE

Generic Architecture for Caching Table Data: Supercharge Your Cache
By: Mark Vilrokx
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 4
    2005-10-18

    Table of Contents:
  • Generic Architecture for Caching Table Data: Supercharge Your Cache
  • Switching the cache on and off
  • Don’t Forget to Flush
  • Conclusion

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    The Best Selling PC Migration Utility.
     
    ADVERTISEMENT

    Route your faxes to your email inbox. Private, secure fax numbers available from CallWave. Choose your fax number.

    Generic Architecture for Caching Table Data: Supercharge Your Cache
    (Page 1 of 4 )

    In the first part of this series we started of by putting the basic structures in place for a cache and wrote some code to manage the cache. In this next part, we will extend the functionality of our cache.

    Things to look out for when using a cache

    Although caching is a fabulous way to increase performance, it has a couple of drawbacks.  First of all, data in the cache can get out of sync with the data in the database: a record you cached might get updated or even removed from the database.  This is one of the reasons you should not use caching on transactional data that gets changed a lot.  These synchronization issues can result in “unpredictable” behavior of your code and are potentially very hard to debug.  Because we hide our caching logic, a fellow developer who is using your package might not understand why, when the database says “The Department Name of department 20 is R&D”, your procedure consistently returns that “The Department Name of department 20 is Research”.

    A second issue with caching is that, by its very nature, it consumes memory.  This becomes a problem when either your cache becomes very big or there are many users who simultaneously, in separate sessions, use your package, spawning many caches.  Besides causing memory issues, big caches also tend to become slower, that is they do not scale very well.  This obviously defeats the purpose of having a cache in the first place so try to keep them as small as possible.

    In a later part of this series we will try to implement solutions for these issues but for now, like a true developer, I first would like to try an easy solution.

    More Oracle Articles
    More By Mark Vilrokx


       · Hi,Second in the series, please provide any feedback as you...
       · Hi!On Page #3 you wrote that "... there is still data in the cache, occupying...
       · Hi,Thank you for your comments. I must say, I did use to free up the memory...
     

       

    ORACLE ARTICLES

    - Tuning PL/SQL Code
    - Debugging PL/SQL Code
    - Testing PL/SQL Code
    - Working With PL/SQL Code
    - Conditional Compilation for Oracle Database ...
    - Compile-Time Warnings for Oracle DB 10g
    - Compiling PL/SQL Code for an Oracle Database
    - Troubleshooting PL/SQL Code
    - Managing PL/SQL Code
    - Data Manipulation and More for HTML DB Appli...
    - Oracle Database Fundamentals
    - Adding Processes to HTML DB Applications
    - Adding Computations, Processes, and Validati...
    - Sub-templates and More with Oracle HTML DB
    - Focusing on Templates in Oracle HTML DB




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway