initialize two caches