Tags:
create new tag
view all tags

SID-01844: Setup a topic to be rendered in the background

Status: Answered Answered TWiki version: 6.0.0 Perl version: Perl 5.14.2
Category: CategoryTemplates Server OS: Ubuntu 12.10 Last update: 12 years ago

I have a WebLeftBar that includes a tree of the whole site. In order to speed things up I'd like the tree to be generated in a background job and included on display instead of constructed anew on every page load.

I imagine that to do this I should make a Twiki topic that generates the tree. This will be loaded by a cron script every couple of seconds and written to disk. Then I modify the view template to include the generated page in WebLeftBar.

Any tips? I'm sure this pattern has been applied by others so I thought I'd ask before implementing it anew.

Thanks

-- Michael Sprague - 2013-12-22

Discussion and Answer

I went ahead and wrote a little script that calls expandCommonVariables on the given topic and writes the result to disk. However, my web restricts TWikiGuest access and the script appears to run as guest. How do I make a script run as admin?

-- Michael Sprague - 2013-12-26

Michael, I just wrote a blog post about this, BlogEntry201312x1: How to cache a sidebar for better performance

-- Peter Thoeny - 2013-12-27

      Change status to:
ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
SupportForm
Status Answered
Title Setup a topic to be rendered in the background
SupportCategory CategoryTemplates
TWiki version 6.0.0
Server OS Ubuntu 12.10
Web server Apache 2.2.22
Perl version Perl 5.14.2
Browser & version

Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2013-12-27 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.