Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Changes between Version 6 and Version 7 of SqlobjectCaching


Ignore:
Timestamp:
11/29/05 12:20:24 (14 years ago)
Author:
kevin
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • SqlobjectCaching

    v6 v7  
    4141Transactions have their own !CacheSet. The cache in a Transaction does not interact with the cache in the main DBConnection. This means that you may end up with stale data if you do something like this: 
    4242 
    43 * pull an object from the database 
    44 * switch to a transaction 
    45 * pull the same object from the database 
    46 * update it 
    47 * commit the transaction 
    48 * access that object again outside of the Transaction 
     43 * pull an object from the database 
     44 * switch to a transaction 
     45 * pull the same object from the database 
     46 * update it 
     47 * commit the transaction 
     48 * access that object again outside of the Transaction 
    4949 
    5050More insidious, though, is that the cache that you had outside of the Transaction will outlast single requests. So, it's possible that the stale data could show up for a few more requests before finally being dropped from the cache.