It depends on your exact set up I think. Are you using Infinispan as the 2nd level cache for Hibernate?
Assuming you do all your database work through an ORM like Hibernate, then you could use an EntityListener to listen for updates to the database, and use that to evict entries from the cache that are now invalid. However, I'm not sure how well this will scale. In general it's better to determine an expiration for items in the cache that your business requirements will allow for.
No right now i am not using hibernate /CACHE 2only access the data and insert the database in to infinispan cache and do operation here i can update the database by using time interval to update database but i dont know how to update the infinispan cache if the database update by physically or web service.
How the Database reflect in infinispan.when Database update by Physically / any web service/Directly ?
Thanks For Reply
AIUI your architecture you need to write a manual hook that can remove entries from the cache as needed.