This question about Missing functionality: Answered

Caching searches spanning multiple webs

Here is the basic use case:
  • Organizational intranet site with approximately 60 departmental webs.
  • Calendar event and announcement topics are created in each departmental web. Some events & announcements are targeted within the department and are only displayed in that web. Other events and announcements are for the entire organization and are displayed on the main site landing page.
  • The main site landing page includes searches that search all webs for events and announcements to be displayed. This is causing unacceptable load times on the main page (~20-30 seconds).

I am trying various page caching options to get the load time on the main page to an acceptable level. Here's some of the the things I've tried or considered and related questions (in bold):
  • Define a search for Events and Announcements (across all webs) in a separate topic that is then INCLUDEd in the front page.
    • If I set CACHEABLE off in the INCLUDEd page, does that affect the caching of the INCLUDED content in the front page?
    • Likewise, if i were to put the search in the INCLUDEd page inside "dirtyarea" tags (also inside the start and stop include tags), would that affect how the content is cached in the front page?
    • Does page caching have any relation to pages cached via VarCachePlugin? Could I use that plugin to cache the searches in the INCLUDEd page, but not affect other dynamic content in the front page?
  • Maximize caching of the left navigation bar.
    • Enabling caching for a page also affects the navigation menu (left side bar). For one, WebLeftBarLogin does not display user name (when logged in). This is even after setting CACHEABLE to off in the navigation menu page and WebLeftBarLogin. Any idea why this would be?

...more to come...

-- LynnwoodBrown - 16 May 2012


I ended up not using any of the currently available caching plugins for this situation. Instead, I came up with a some-what funky but very functional hack. Here's what I did:
  • Created a page that contained a series of searches for events and announcements across multiple webs.
  • Used AttachContentPlugin to save pre-formatted search results as text files on the topic.
  • Created a cron job to periodically re-save the topic and thereby update the attached files.
  • Included the attached files on the front page to display search results using this format: %INCLUDE{"%PUBURLPATH%/%WEB%/CacheTopic/cachefile.txt"}%

The front page loaded quickly and the server was not burdened with running complex searches across multiple webs on every view of the front page. cool

-- LynnwoodBrown - 15 Jan 2013


QuestionForm edit

Subject Missing functionality
Version Foswiki 1.1.5
Status Answered
Related Topics
Topic revision: r2 - 15 Jan 2013, LynnwoodBrown - This page was cached on 13 May 2019 - 13:51.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy