test_class.file: handlebars-guava-cache/src/test/java/com/github/jknack/handlebars/io/GuavaCachedTemplateLoaderTest.java
test_class.identifier: GuavaCachedTemplateLoaderTest
test_case.body: @Test
    public void testCacheWithExpiration() throws Exception {
      TemplateLoader loader = new FileTemplateLoader(new File(
          "src/test/resources"));
      TemplateLoader cachedLoader = GuavaCachedTemplateLoader
          .cacheWithExpiration(loader, 200, TimeUnit.MILLISECONDS);
  
      assertNotNull(loader.sourceAt("template"));
      assertNotNull(cachedLoader.sourceAt("template"));
  
      final int TOTAL = 1000;
  
      Stopwatch sw = Stopwatch.createStarted();
      for (int i = 0; i < TOTAL; i++) {
        loader.sourceAt("template");
      }
      sw.stop();
      out.println("Loader took: " + sw);
      sw.reset().start();
      for (int i = 0; i < TOTAL; i++) {
        cachedLoader.sourceAt("template");
      }
      out.println("Cached took: " + sw);
  
    }
test_case.class_method_signature: GuavaCachedTemplateLoaderTest.testCacheWithExpiration()
test_case.full_signature: @Test public void testCacheWithExpiration()
test_case.identifier: testCacheWithExpiration
test_case.invocations: cacheWithExpiration assertNotNull sourceAt assertNotNull sourceAt createStarted sourceAt stop println start reset sourceAt println
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testCacheWithExpiration()
focal_class.declarator: delegate
focal_class.modifier: private final
focal_class.original_string: private final TemplateLoader delegate;
focal_class.type: TemplateLoader
focal_class.var_name: delegate
focal_class.declarator: cache
focal_class.modifier: private final
focal_class.original_string: private final Cache<String, TemplateSource> cache;
focal_class.type: Cache<String, TemplateSource>
focal_class.var_name: cache
focal_class.file: handlebars-guava-cache/src/main/java/com/github/jknack/handlebars/io/GuavaCachedTemplateLoader.java
focal_class.identifier: GuavaCachedTemplateLoader
focal_class.interfaces: implements TemplateLoader
focal_class.class_method_signature: GuavaCachedTemplateLoader.GuavaCachedTemplateLoader(final TemplateLoader delegate,
        final Cache<String, TemplateSource> cache)
focal_class.full_signature: public  GuavaCachedTemplateLoader(final TemplateLoader delegate,
        final Cache<String, TemplateSource> cache)
focal_class.identifier: GuavaCachedTemplateLoader
focal_class.modifiers: public
focal_class.parameters: (final TemplateLoader delegate,
        final Cache<String, TemplateSource> cache)
focal_class.signature:  GuavaCachedTemplateLoader(final TemplateLoader delegate,
        final Cache<String, TemplateSource> cache)
focal_class.class_method_signature: GuavaCachedTemplateLoader.cacheWithExpiration(
        final TemplateLoader delegate, final long duration, final TimeUnit unit)
focal_class.full_signature: public static GuavaCachedTemplateLoader cacheWithExpiration(
        final TemplateLoader delegate, final long duration, final TimeUnit unit)
focal_class.identifier: cacheWithExpiration
focal_class.modifiers: public static
focal_class.parameters: (
        final TemplateLoader delegate, final long duration, final TimeUnit unit)
focal_class.return: GuavaCachedTemplateLoader
focal_class.signature: GuavaCachedTemplateLoader cacheWithExpiration(
        final TemplateLoader delegate, final long duration, final TimeUnit unit)
focal_class.class_method_signature: GuavaCachedTemplateLoader.sourceAt(final String location)
focal_class.full_signature: public TemplateSource sourceAt(final String location)
focal_class.identifier: sourceAt
focal_class.modifiers: public
focal_class.parameters: (final String location)
focal_class.return: TemplateSource
focal_class.signature: TemplateSource sourceAt(final String location)
focal_class.class_method_signature: GuavaCachedTemplateLoader.resolve(final String location)
focal_class.full_signature: public String resolve(final String location)
focal_class.identifier: resolve
focal_class.modifiers: public
focal_class.parameters: (final String location)
focal_class.return: String
focal_class.signature: String resolve(final String location)
focal_class.class_method_signature: GuavaCachedTemplateLoader.getPrefix()
focal_class.full_signature: public String getPrefix()
focal_class.identifier: getPrefix
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getPrefix()
focal_class.class_method_signature: GuavaCachedTemplateLoader.getSuffix()
focal_class.full_signature: public String getSuffix()
focal_class.identifier: getSuffix
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getSuffix()
focal_class.class_method_signature: GuavaCachedTemplateLoader.setPrefix(final String prefix)
focal_class.full_signature: public void setPrefix(final String prefix)
focal_class.identifier: setPrefix
focal_class.modifiers: public
focal_class.parameters: (final String prefix)
focal_class.return: void
focal_class.signature: void setPrefix(final String prefix)
focal_class.class_method_signature: GuavaCachedTemplateLoader.setSuffix(final String suffix)
focal_class.full_signature: public void setSuffix(final String suffix)
focal_class.identifier: setSuffix
focal_class.modifiers: public
focal_class.parameters: (final String suffix)
focal_class.return: void
focal_class.signature: void setSuffix(final String suffix)
focal_class.class_method_signature: GuavaCachedTemplateLoader.setCharset(final Charset charset)
focal_class.full_signature: @Override public void setCharset(final Charset charset)
focal_class.identifier: setCharset
focal_class.modifiers: @Override public
focal_class.parameters: (final Charset charset)
focal_class.return: void
focal_class.signature: void setCharset(final Charset charset)
focal_class.class_method_signature: GuavaCachedTemplateLoader.getCharset()
focal_class.full_signature: @Override public Charset getCharset()
focal_class.identifier: getCharset
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Charset
focal_class.signature: Charset getCharset()
focal_method.body: public static GuavaCachedTemplateLoader cacheWithExpiration(
        final TemplateLoader delegate, final long duration, final TimeUnit unit) {
      Cache<String, TemplateSource> cache = CacheBuilder.newBuilder()
          .expireAfterAccess(duration, unit).build();
      return new GuavaCachedTemplateLoader(delegate, cache);
    }
focal_method.class_method_signature: GuavaCachedTemplateLoader.cacheWithExpiration(
        final TemplateLoader delegate, final long duration, final TimeUnit unit)
focal_method.full_signature: public static GuavaCachedTemplateLoader cacheWithExpiration(
        final TemplateLoader delegate, final long duration, final TimeUnit unit)
focal_method.identifier: cacheWithExpiration
focal_method.invocations: build expireAfterAccess newBuilder
focal_method.modifiers: public static
focal_method.parameters: (
        final TemplateLoader delegate, final long duration, final TimeUnit unit)
focal_method.return: GuavaCachedTemplateLoader
focal_method.signature: GuavaCachedTemplateLoader cacheWithExpiration(
        final TemplateLoader delegate, final long duration, final TimeUnit unit)