-
Notifications
You must be signed in to change notification settings - Fork 1
VAHub Back End Caching
VAHub widely uses caching to avoid data re-querying, re-calculation and re-composition for identical requests. Most part of data is read-only for VAHub and common for all users, so identical requests is a normal thing in ACUITY.
VAHub uses different caching solutions:
Both store cached values in file form.
Location of file storage for Kryo cache is defined by property kryo.storage.location
in main properties file of vahub-model
module of VAHub project (currently named inmemory.properties
due to history reasons). This file properties are loaded with com.acuity.visualisations.rawdatamodel.config.InmemoryConfig
Spring configuration class. The discussed property value is injected into com.acuity.visualisations.rawdatamodel.dataproviders.common.DataProvider
bean.
Typically, Kryo cache is used in ACUITY to create separate file cache for each dataset that contains all raw data of the requested type belonging to the given dataset. Data providers use this functionality to cache raw data before enrichment.
To define Ehcache file storage location, we have ehcache.xml
configuration file in vahub-config
module of VAHub project. The com.acuity.visualisations.config.ApplicationEhCacheConfig
configuration file loads this file and uses it to provide a org.springframework.cache.ehcache.EhCacheManagerFactoryBean
bean.
Ehcache caching is mostly used to cache results of frontend requests. To use this feature, one have to mark corresponding REST resource method with @Cacheable
annotation, and the whole resource class — with @CacheConfig
annotation, specifying keyGenerator = "datasetsKeyGenerator"
and cacheResolver = "refreshableCacheResolver"
(see com.acuity.visualisations.rest.resources.cardiac.CardiacResource
as an example). These are custom ACUITY key generator and cache resolver implemented correspondingly in classes com.acuity.visualisations.common.cache.DatasetsKeyGenerator
and com.acuity.visualisations.common.cache.RefreshableCacheResolver
.
- System Requirements
- Azure Setup
- Machine Insights and CBioPortal Integration
- SSL Certificates
- Applications Setup
- Application Spring Configs
- Profiles
- Migrating to ACUITY 9
- Github packages and Docker images
- Result data tables
- Mapping data tables
- Third party solution tables
- Other data tables
- Tables to delete