Caching
There are multiple caches within OpenVPMS. These are used to improve performance, but in some cases and circumstances changes you make may not be immediately effective.
In general, if you update the database outside OpenVPMS, the changes:
- won't be seen immediately; or
- won't be seen until the object is edited, assuming it is not in the second level cache
- won't be seen till restart
The major caches are listed below:
1. Hibernate's second level cache, configured by ehcache.xml
Elements in this cache are set with the flag eternal="true", which means that they don't expire unless the cache capacity is reached, in which case the least recently used will be tossed out.
2. Archetypes
Elements in this cache can only be updated by:
- editing/loading archetypes via Administration - Archetypes
- Tomcat restart
3. Lookups
Elements in this cache can be updated:
- by editing via Administration - Lookups
- when cache capacity is exceeded - least recently used elements are discarded
- on low memory - elements will be shed from the cache to reclaim memory
- by Tomcat restart
4. Appointments/tasks
Elements in this cache can be updated:
- by editing via Workflow - Scheduling, Workflow - Tasks
- when cache capacity is exceeded - least recently used elements are discarded
- on low memory - elements will be shed from the cache to reclaim memory
- by Tomcat restart
5. Current user context
This includes the current:
- practice
- practice location
- stock location
- schedule view
- schedule
- work list view
- work list
- customer
- patient
- clinician
- user
- till
- deposit account
Refreshed by:
- switching objects (e.g changing practice locations).
- logging out/in