Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
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?

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?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://667808]
help
Chatterbox?
[choroba]: Discipulus Sounds interesting. Any pictures of the puppets or paintings?
[Corion]: Oof - "Anyway, if it is not obvious, please keep this discussion entirely confidential for now.", as seen on a public mailing list ;)
[Discipulus]: uh no choroba.. i do not practice much with online putyour image sites:can you suggest one (that possibly remove the pic after few days)?
[choroba]: Corion a bug report?

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (7)
As of 2017-03-27 07:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (317 votes). Check out past polls.