This content has been marked as final.
Show 2 replies
-
1. Re: How to update cache when new rows has been added into ta
mircea.markus Feb 5, 2008 12:40 PM (in response to narendrakg)basically your cache needs to be notified by the data store whenever a certain table data is modified, and at that point it should cleanup the cache(the DBMS might help you on this, e.g. JServer).
If you can stale data for short periods of time is acceptable, you can write an eviction policy that will call periodically the database for external updates and cleanup the cache accordingly. -
2. Re: How to update cache when new rows has been added into ta
brian.stansberry Feb 6, 2008 10:59 AM (in response to narendrakg)Once you've solved the problem of figuring out how to be made aware that the external app has changed the db, suggest you ask on the Hibernate forums for the best approach on how to remove data from the cache. Hibernate has some APIs for flushing stuff from the cache; using those APIs is a better approach than trying to directly manipulate the cache yourself.