In EHCache, is there a way to implement some kind of a db listener where the cahce will auto update if the data is out of sync? (e.g as soon as the user requests for data, the cahce checks if the data is out of sync, if yes...updates itself and returns the data, if not...just return the data from the cache)If someone can point me which part of the specification highlights this use, that would be awesome!
The goal is to always provide the latest data to the user. So I am guessing a timed refresh mechanism will not do as the data can change anytime.
EHCAche is not mandatory to use in my case, so any mechanism that satisfies this will be most welcome...
Thanks!!