![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| prolems figuring out dns | nbredthauer | UNIX for Advanced & Expert Users | 1 | 04-13-2008 03:04 AM |
| Multple crons at boot | ertzman | SCO | 0 | 11-20-2007 10:24 AM |
| Crons executed multiple times. | shorty | UNIX for Dummies Questions & Answers | 2 | 03-14-2007 12:05 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Hello, I've built a news site using SimplePie to pull in a set of feeds and display them on a page. The caching is working but the problem is that the first initial load is slow. After that, you can hit refresh and it loads very quickly. I'd like to eliminate that first slow load by creating a cronjob, which is what I've heard many other people do. I'm very new to crons and programming in general so hopefully someone can help me understand this. I found one example of a guy using the following cron to automatically visit his page and he syncronized the cache duration, thus eliminating any slow starts: Code:
0,15,30,45 * * * * wget -q --spider http://thewebsite.com The problem I found was that my host doesn't support wget (or lynx, or ssh) so I've been trying to write a cron that will achieve the same results but using either curl or php. Here is what I have so far: Code:
*/15 * * * * curl --silent --compressed http://www.mysite.com/index.php Code:
*/15 * * * * php /home/username/public_html/index.php Again, I found these examples from reading other resources so I'm not entirely sure what they're doing or if they're correct for my situation. I've also set the cache duration to match at 15 minutes. When I run either the curl or php cron above, in my e-mail I receive the entire html source for the specified index.php. I'm assuming this means they're working correctly, but still my news page has that initial slow load. I'm open to any thoughts or ideas. Thanks in advance. |
|
||||
|
Thanks for the fast response, Reborg.
I'm not sure what type of cache I'm using. Is there a quick way to find out? It's whatever is default when using SimplePie, because I haven't changed it. Could you please describe how I might use the "ab" apache benckmarking tool? I have not heard of it before and would not know where to begin. If you could provide an example of how I would use that to pass the url through, I would really appreciate it. Again, thank you for the reply. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|