docs: public static void addToCache(AdvancedCache cache, PutFromLoadValidator validator) {
        AsyncInterceptorChain chain = cache.getAsyncInterceptorChain();
        List<AsyncInterceptor> interceptors = chain.getInterceptors();
        log.debugf("Interceptor chain was: ", interceptors);
        int position = 0;
  		// add interceptor before uses exact match, not instanceof match
  		int entryWrappingPosition = 0;
        for (AsyncInterceptor ci : interceptors) {
  			if (ci instanceof EntryWrappingInterceptor) {
  				entryWrappingPosition = position;
  			}
  			position++;
  		}
  		boolean transactional = cache.getCacheConfiguration().transaction().transactionMode().isTransactional();
        BasicComponentRegistry componentRegistry =
           cache.getComponentRegistry().getComponent(BasicComponentRegistry.class);
        if (transactional) {
  			TxInvalidationInterceptor txInvalidationInterceptor = new TxInvalidationInterceptor();
  			// We have to use replaceComponent because tests call addToCache more than once
           componentRegistry.replaceComponent(TxInvalidationInterceptor.class.getName(), txInvalidationInterceptor, true);
           componentRegistry.getComponent(TxInvalidationInterceptor.class).running();
  			chain.replaceInterceptor(txInvalidationInterceptor, InvalidationInterceptor.class);
  
  			// Note that invalidation does *NOT* acquire locks; therefore, we have to start invalidating before
  			// wrapping the entry, since if putFromLoad was invoked between wrap and beginInvalidatingKey, the invalidation
  			// would not commit the entry removal (as during wrap the entry was not in cache)
           TxPutFromLoadInterceptor txPutFromLoadInterceptor = new TxPutFromLoadInterceptor(validator, ByteString.fromString(cache.getName()));
           componentRegistry.replaceComponent(TxPutFromLoadInterceptor.class.getName(), txPutFromLoadInterceptor, true);
           componentRegistry.getComponent(TxPutFromLoadInterceptor.class).running();
           chain.addInterceptor(txPutFromLoadInterceptor, entryWrappingPosition);
  		}
  		else {
  			NonTxPutFromLoadInterceptor nonTxPutFromLoadInterceptor = new NonTxPutFromLoadInterceptor(validator, ByteString.fromString(cache.getName()));
           componentRegistry.replaceComponent(NonTxPutFromLoadInterceptor.class.getName(), nonTxPutFromLoadInterceptor, true);
           componentRegistry.getComponent(NonTxPutFromLoadInterceptor.class).running();
           chain.addInterceptor(nonTxPutFromLoadInterceptor, entryWrappingPosition);
  
  			NonTxInvalidationInterceptor nonTxInvalidationInterceptor = new NonTxInvalidationInterceptor();
           componentRegistry.replaceComponent(NonTxInvalidationInterceptor.class.getName(), nonTxInvalidationInterceptor, true);
           componentRegistry.getComponent(NonTxInvalidationInterceptor.class).running();
  			chain.replaceInterceptor(nonTxInvalidationInterceptor, InvalidationInterceptor.class);
  
  			LockingInterceptor lockingInterceptor = new LockingInterceptor();
           componentRegistry.replaceComponent(LockingInterceptor.class.getName(), lockingInterceptor, true);
           componentRegistry.getComponent(LockingInterceptor.class).running();
  			chain.replaceInterceptor(lockingInterceptor, NonTransactionalLockingInterceptor.class);
  		}
  		log.debugf("New interceptor chain is: ", cache.getAsyncInterceptorChain());
  
        CacheCommandInitializer cacheCommandInitializer =
           componentRegistry.getComponent(CacheCommandInitializer.class).running();
  		cacheCommandInitializer.addPutFromLoadValidator(cache.getName(), validator);
  	}