added functionality to cache and fetch reference data