1. David Black
  2. atlassian-soy-templates

Commits

Dave Loeng [Atlassian]  committed 2cf72cb

SOY-27: ensure we only lazily load the lastModifiedCache in dev mode

  • Participants
  • Parent commits 6333b17
  • Branches master

Comments (0)

Files changed (1)

File soy-template-plugin/src/main/java/com/atlassian/soy/impl/DefaultSoyManager.java

View file
  • Ignore whitespace
                 // this module.
                 throw new SoyException("Unable to compile Soy template in plugin module: " + completeModuleKey);
             }
-            else
+            else if (isDevMode()) // SOY-27: if we successfully load a tofu, we need to record the last modified date of it (ultimately soyTofuCache and lastModifiedCache should be kept in sync for a particular completeModuleKey)
             {
-                // SOY-27: if we successfully load a tofu, we need to record the last modified date of it (ultimately soyTofuCache and lastModifiedCache should be kept in sync for a particular completeModuleKey)
-                if (isDevMode())
-                    lastModifiedCache.getUnchecked(completeModuleKey);
+                lastModifiedCache.getUnchecked(completeModuleKey);
             }
 
             tofu.newRenderer(templateName)