code: protected SelfPopulatingCache replaceWithSelfPopulatingCacheIfNot(Ehcache ehcache, CacheEntryFactory factory){
  		if (ehcache instanceof SelfPopulatingCache){
  			return (SelfPopulatingCache) ehcache;
  		}
  		
  		SelfPopulatingCache selfPopulatingCache = new SelfPopulatingCache(ehcache, factory);
  		selfPopulatingCache.setTimeoutMillis((int)ehcache.getCacheConfiguration().getCacheLoaderTimeoutMillis());
  
          cacheManager.replaceCacheWithDecoratedCache(ehcache, selfPopulatingCache);
  		return selfPopulatingCache;
  	}
docs: Replace the cache with a SelfPopulatingCache decorated one if this has not been done yet.
  The cacheLoaderTimeoutMillis of the original cache will be used as the timeoutMillis of the BlockingCache.
  @param ehcache			the original cache
  @param factory			the cache entry value factory
  @return a BlockingCache wrapping the original one