Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

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?


Comment on Re^2: Slow SSI
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?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://667808]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (14)
As of 2014-10-24 13:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (132 votes), past polls