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
Work-around
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.
--
LynnwoodBrown - 15 Jan 2013