code: public static SimpleTemplate getTemplate( String file )
      {
          String templateText = templateData.get( file );
  
          if ( templateText == null || !cacheTemplates ) {
              try (FileReader fr = new FileReader( file )) {
                  templateText = SimpleTemplate.getStringFromStream( fr );
                  templateData.put( file, templateText );
              } catch ( IOException e ) {
                  // Not found
                  templateData.put( file, NO_TEMPLATE );
              }
          } else
              // Quick check prevents trying each time
              if ( templateText.equals( NO_TEMPLATE ) )
                  return null;
  
          if ( templateText == null )
              return null;
          else
              return new SimpleTemplate( templateText );
      }
docs: Get a template by name, with caching.
  Note: this should be updated to search the resource path first, etc.
  
  Create a new instance of a template from the specified file.
  
  The file text is cached so lookup is fast.  Failure to find the
  file is also cached so the read will not happen twice.