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.
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.