Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-11053

searchsuggest.js is not cached on browser side

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 6.2-rc-1
    • Fix Version/s: None
    • Component/s: Search - Generic
    • Labels:
    • Difficulty:
      Unknown
    • Similar issues:

      Description

      Here is why according to Marius Dumitru Florea:

      I assume it's because of this Velocity code https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-web/src/main/webapp/resources/uicomponents/search/searchSuggest.js#L168 . searchSuggest.js needs to be 'invalidated' whenever you edit the search suggest sources in the administration.

      One solution from Marius Dumitru Florea:

      Best would be to create a JSON services that provides the details about the search suggest source. This way searchSuggest.js only makes an AJAX request initially to fetch the sources (and thus can be cached in the browser). This code was written initially by Jerome I think, and I didn't had the time to fully refactor it when I added support for Solr search suggest sources.

      Note that loading this resource is pretty slow (around 318ms in 6.2 done at each page load).

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              tmortagne Thomas Mortagne
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Date of First Response: