code: protected Reader retrieveFromCache(String path, GeneratorContext context, CacheMode cacheMode) {
  
  		Reader rd = null;
  		String filePath = getTempFilePath(context, cacheMode);
  		
  		FileInputStream fis = null;
  		File file = new File(filePath);
  		if (file.exists()) {
  			try {
  				fis = new FileInputStream(file);
  			} catch (FileNotFoundException e) {
  				throw new BundlingProcessException("An error occured while creating temporary resource for " + filePath,
  						e);
  			}
  			FileChannel inchannel = fis.getChannel();
  			rd = Channels.newReader(inchannel, context.getConfig().getResourceCharset().newDecoder(), -1);
  			context.setRetrievedFromCache(true);
  			if (LOGGER.isDebugEnabled()) {
  				LOGGER.debug(getName() + " resource '" + path + "' retrieved from cache");
  			}
  		}
  		return rd;
  	}
docs: Retrieves the resource from cache if it exists
  
  @param path
  the resource path
  @param context
  the generator context
  @param cacheMode
  the cache mode
  @return the reader to the resource