Setting up routine to cache reference data locally