Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re^2: Slow SSI

by Baffled (Acolyte)
on Feb 13, 2008 at 20:04 UTC ( #667808=note: print w/replies, xml ) Need Help??

in reply to Re: Slow SSI
in thread Slow SSI

Thats actually a really good idea and something totally different than I was expecting. It wouldnt even have to be every minute, more like every 30 would work. I've never made a crone job before, but have heard of it. So this would be a independent script that ran in the background? Would it still be a cgi type of file? Im thinking your talking about splitting this file into two parts and making the search for item part run by crone in the background while the print stuff is called from the html? Or would it still be a ssi?

Replies are listed 'Best First'.
Re^3: Slow SSI
by tachyon-II (Chaplain) on Feb 14, 2008 at 14:18 UTC
    For minimum modification you would change your SSI from
    <!--#exec cgi="/cgi-bin/foo.cgi"--> to <!--#include virtual="/cache/latest.html" -->

    You would add a command to your crontab like:

    30 * * * * /www/cgi-bin/foo.cgi > /www/cache/latest.html

    All this entry does is run the foo.cgi script once every 30 minutes and pipe the output to the file you are including via your SSI. Naturally you will need to adjust the paths and names to suit. Execute the command once to generate the latest.html include and also ensure that the command works as expected.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://667808]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (8)
As of 2018-07-16 18:53 GMT
Find Nodes?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?

    Results (346 votes). Check out past polls.