New Posts New Posts RSS Feed: Clear the cache - when?
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Clear the cache - when?

 Post Reply Post Reply
Author
IdeaBlade View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 30-May-2007
Location: United States
Posts: 353
Post Options Post Options   Quote IdeaBlade Quote  Post ReplyReply Direct Link To This Post Topic: Clear the cache - when?
    Posted: 12-Jul-2007 at 4:30pm
You have to be very careful about clearing the cache of the PersistenceManager.  If you don’t do it correctly, you can easily encounter mysterious crashes.

 

The important thing to know is what pieces of software hold references to the entities in the cache.  For example, in our UI software, most BindingSources are composed of EntityLists which hold references to entities in the cache.  If you clear the cache, the BindingManager or the Grid will try to traverse the EntityList and will crash due to a null reference.  You can run into similar problems with Event Handlers and Property Descriptors.  The same thing will happen if you use some other vendor’s UI software.  This software will initially be able to reference the objects in the cache, but before you can clear the cache, you need to be sure that there are no longer any references to the objects in the cache.

Back to Top
Customer View Drop Down
Senior Member
Senior Member
Avatar
User Submitted Questions to Support

Joined: 30-May-2007
Location: United States
Posts: 260
Post Options Post Options   Quote Customer Quote  Post ReplyReply Direct Link To This Post Posted: 12-Jul-2007 at 4:29pm

I would like to ask you something about clearing the cache of the PersistenceManager. 

In our application, we are using only one PersistenceManager but we want to identify a good moment in time when we should clear its cache.

The database used by our application is updated also by a different application (developed without IdeaBlade) and that’s why we need to be really sensitive to the changes appeared on our objects after they are loaded in the cache.

Could you help us to design a good approach for this problem?

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down