Uploaded image for project: 'Velocity'
  1. Velocity
  2. VELOCITY-851

refreshResource does not add resource to cache when using multiple resource loaders

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.7
    • Fix Version/s: 2.1
    • Component/s: Engine
    • Labels:
      None

      Description

      The issue is seen when you have multiple resource loaders configured and and template can be loaded by a higher priority resource loader.

      The resource is loaded by loadResource but it is never added to the globalCache (see ResourceManagerImpl.java).

      For example if (see ResourceLoader.java):
      modificationCheckInterval = 60
      isCachingOn = true

      When a change is detected by a higher priority resource loader it is loaded correctly the next time resource.requiresChecking() is true but it is never added to the globalCache or the existing entry in the cache is not evicted this causes the next request to use the resource from the cache which contains the template from a lower priority resource loader.

      The expected result would be that the higher priority template is added to the globalCache and is used in subsequent requests.

        Attachments

          Activity

            People

            • Assignee:
              claude Claude Brisson
              Reporter:
              enietzel Earle Nietzel
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: