code: public static void prepare() throws InterruptedException {
  		semaphore.acquire();
  		if (cacheReference == masterCache) {
  			slaveCache.clear();
  		} else {
  			masterCache.clear();
  		}
  	}
docs: Prepare to build cache
  
  @throws InterruptedException