OpenMRS API caches some entities in the hibernate 2nd level cache, we need to add utility methods to the Context class to evict entities from the database cache.
We need methods to do the following,
- Evicting a single entity from the cache
- Evicting all entities of a given type from the cache
- Clearing the entire cache
This logic is already implemented in the rest webservice module as part of
RESTWS-866, we need to port the logic to core.