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

searchsuggest.js is not cached on browser side

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 6.2-rc-1
    • Search - Generic
    • Unknown

    Description

      Here is why according to mflorea:

      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 mflorea:

      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

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated: