Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-7049

No need to refresh project cache when creating new issues

    XMLWordPrintable

Details

    Description

      Why is the project cache being refreshed on CachingProjectManager.getNextId() ?

      I can see why it used to be refreshed. In the past (v 2.5.3) if the
      project cache wasnt refreshed, then the project cache would be shagged.
      This was because the project GV was being used as the key in the cacheing
      hashmap (and the GV changes every time an issue is created - the nextId is
      incremented)
      I see this last bug has been fixed (ProjectCache is now using the project
      ID as the key)

      So, given that this last bug was fixed - do we actually need to refresh the
      project cache any more?
      From what I can see in the refresh, there is absolutely nothing in there
      that could have changed by adding a new issue....

      PS
      Somewhat unrelated: there also is some code that could be tidied in
      CachingProjectManager (that is assuming it is required at all)

      public void refresh(GenericValue project)

      { ProjectCache.getCache().refresh(project); }

      You have a field "cache" which you could use. The code should be

      public void refresh(GenericValue project)

      { cache.refresh(project); }

      Need to have a look at this to ensure whether there are no repercussions for these changes. It should be OK.

      Attachments

        Activity

          People

            dylan@atlassian.com Dylan Etkin [Atlassian]
            anton@atlassian.com AntonA
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: