adding cache at runtime to load api environment into memory