Flushing the cache

l.s.

How can i flush all the objects (preverably of a specific type) in the cache without having to evict each indivdual object?

regards anthony van den Berg

Hi Antony,

What kind of ‘objects’ do you mean? Are you referring to the ORM objects?

Best Regards,
Jick

Yes orm objects.

Hi anthony van den Berg,

Sorry, we do not understand your message. Would you mind explaining in more detail? What do you mean by ‘flushing the cache’ and what’s the ‘cache’ that you are referring to?

Best Regards,
Jick

I hav an application wich uses orm objects say employees. I load some objects in memory at location in x
i then release those objects.
i make changes to one of the objects in but doi this in de database itself.
I load the objects again in location x (without restarting the application) and i do’nt see the changes made in the database because those objects have been cahced at location x.
How can i prvent this (or flush the cahce).
I no how to do this on an object per object basis (with evict) but would like to do it for all objects or all objects of a specific class in the cache

Hi anthony@kaartjeposten.nl,

It depends on your application design. If possible, open and close session for each operation. When you update the database and open a new session, it will load the new value.

Best Regards,
Jick

Thanks,

That is exactly what i was looking for.
Might be useful to put this in the documentation (or is it documentet ouside the helpsystem of VP uml?)

Thanks anthony van den Berg for your request. I just discussed with our team and we will prepare an article to teach user how to flush the cache.

Best Regards,
Jick

thanks let me know when it is online, so i can read it

Hi anthony van den Berg,

The article is ready. Here is the URL:
http://resource.visual-paradigm.com/java_orm/flushing_objects.html

If there are anything that you do not understand, please feel free to post again.

Best Regards,
Jick