Author |
|
billd3
Senior Member
Joined: 19 February 2003
Location: United States
Status: Offline
Points: 530
|
Post Options
Thanks(0)
Quote Reply
Posted: 02 July 2007 at 12:49pm |
I wondered about a cache, as when I opened the rss feed asp file directly in my browser, it showed our forum posts, just not from the page I put that code in. Fixed/solved/understood. That is COOL! Thanks!
|
BillD
http://theamcpages.com
http://theamcforum.com
|
 |
iSec
Senior Member
Joined: 13 February 2005
Status: Offline
Points: 1140
|
Post Options
Thanks(0)
Quote Reply
Posted: 02 July 2007 at 8:50pm |
-boRg- wrote:
To reduce strain on the server it caches the feed for 10 minutes. Change the 'intTimeToLive = 10' number to 0 and it will force the server to reload it's cache.
|
thanks, that did it ... very nice work.
|
"When it gets dark enough, you can see the stars"
-Charles A. Beard
|
 |
billd3
Senior Member
Joined: 19 February 2003
Location: United States
Status: Offline
Points: 530
|
Post Options
Thanks(0)
Quote Reply
Posted: 02 July 2007 at 9:05pm |
I note that with it set to 10, in our case, it NEVER refreshes - it will show the same each time you load the page, even hours later, or even if you clear your IE cache and restart the browser. Once you have seen what it shows, it sticks. I set it to 0 and it will change. Is there a web server setting that is doing this?
|
BillD
http://theamcpages.com
http://theamcforum.com
|
 |
WebWiz-Bruce
Admin Group
Web Wiz Developer
Joined: 03 September 2001
Location: Poole
Status: Offline
Points: 9647
|
Post Options
Thanks(0)
Quote Reply
Posted: 03 July 2007 at 11:47am |
My msiatke it should be:- If DateDiff("n", Application("rssWebWizForumsUpdated"), Now()) >= intTimeToLive Then With "m" in there it's set to months not minutes, so set to update every 10 months. Teach me for knocking this together in 30 minutes on a Sunday afernoon without properly testing it
Edited by -boRg- - 03 July 2007 at 11:49am
|
|
 |
iSec
Senior Member
Joined: 13 February 2005
Status: Offline
Points: 1140
|
Post Options
Thanks(0)
Quote Reply
Posted: 03 July 2007 at 4:09pm |
-boRg- wrote:
To reduce strain on the server it caches the feed for 10 minutes. Change the 'intTimeToLive = 10' number to 0 and it will force the server to reload it's cache. |
How bad can it get, if I have around 500 people visiting that page every few minutes while the intTimeToLive' number is set to 0, would it bring my server down? Wouldn't that be a security issue?
|
"When it gets dark enough, you can see the stars"
-Charles A. Beard
|
 |
WebCity
Groupie
Joined: 11 December 2003
Location: United States
Status: Offline
Points: 154
|
Post Options
Thanks(0)
Quote Reply
Posted: 07 July 2007 at 7:48pm |
I am getting this error when I try to run this script. I put this in a empty file to test it out
Microsoft VBScript compilation error '800a0408'
Invalid character
/test.asp, line 4 Dim objXMLHTTP 'MS XML Object I named this file test.asp
|
 |
Sumea
Newbie
Joined: 18 September 2006
Status: Offline
Points: 30
|
Post Options
Thanks(0)
Quote Reply
Posted: 16 July 2007 at 6:17am |
Info_Tech wrote:
-boRg- wrote:
To reduce strain on the server it caches the feed for 10 minutes. Change the 'intTimeToLive = 10' number to 0 and it will force the server to reload it's cache. |
How bad can it get, if I have around 500 people visiting that page every few minutes while the intTimeToLive' number is set to 0, would it bring my server down? Wouldn't that be a security issue? |
It could get very bogged down if you set it to 0 and have 500 people visiting every few minutes. I highly recommend you not have it at 0 if you have that many users. What this script is doing is it looks up the rss feed for the latest posts and stores it into an application variable. The application variable is used like a cache, so it that others will see the latest posts without making another query to the database. It is set to do this once every ten minutes, but if you set it to 0, it will look up the rss feed every time a person visits the page. If you do plan to have it at 0, then you may as well not even put the results into an application variable and just output the results via a response.write.
|
 |
Sumea
Newbie
Joined: 18 September 2006
Status: Offline
Points: 30
|
Post Options
Thanks(0)
Quote Reply
Posted: 16 July 2007 at 6:27am |
WebCity wrote:
I am getting this error when I try to run this script. I put this in a empty file to test it out
Microsoft VBScript compilation error '800a0408'
Invalid character
/test.asp, line 4 Dim objXMLHTTP 'MS XML Object I named this file test.asp
|
Can you remove the commentary out? This part: 'MS XML Object
It could be possible that when you copied and pasted the code, another
higher bit character was put in instead of the ' which is used to
comment out comments..
Edited by Sumea - 16 July 2007 at 6:29am
|
 |