Web Wiz - Solar Powered Eco Web Hosting

  New Posts New Posts RSS Feed - Mod: Display Recent Posts (anywhere)
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Mod: Display Recent Posts (anywhere)

 Post Reply Post Reply Page  <1234>
Author
 Rating: Topic Rating: 1 Votes, Average 4.00  Topic Search Topic Search  Topic Options Topic Options
billd3 View Drop Down
Senior Member
Senior Member


Joined: 19 February 2003
Location: United States
Status: Offline
Points: 530
Post Options Post Options   Thanks (0) Thanks(0)   Quote billd3 Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
iSec View Drop Down
Senior Member
Senior Member
Avatar

Joined: 13 February 2005
Status: Offline
Points: 1140
Post Options Post Options   Thanks (0) Thanks(0)   Quote iSec Quote  Post ReplyReply Direct Link To This Post Posted: 02 July 2007 at 8:50pm
Originally posted by -boRg- -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
Back to Top
billd3 View Drop Down
Senior Member
Senior Member


Joined: 19 February 2003
Location: United States
Status: Offline
Points: 530
Post Options Post Options   Thanks (0) Thanks(0)   Quote billd3 Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Poole
Status: Offline
Points: 9647
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post 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 Ouch


Edited by -boRg- - 03 July 2007 at 11:49am
Back to Top
iSec View Drop Down
Senior Member
Senior Member
Avatar

Joined: 13 February 2005
Status: Offline
Points: 1140
Post Options Post Options   Thanks (0) Thanks(0)   Quote iSec Quote  Post ReplyReply Direct Link To This Post Posted: 03 July 2007 at 4:09pm
Originally posted by -boRg- -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
Back to Top
WebCity View Drop Down
Groupie
Groupie
Avatar

Joined: 11 December 2003
Location: United States
Status: Offline
Points: 154
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebCity Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Sumea View Drop Down
Newbie
Newbie


Joined: 18 September 2006
Status: Offline
Points: 30
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sumea Quote  Post ReplyReply Direct Link To This Post Posted: 16 July 2007 at 6:17am
Originally posted by Info_Tech Info_Tech wrote:

Originally posted by -boRg- -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.
Back to Top
Sumea View Drop Down
Newbie
Newbie


Joined: 18 September 2006
Status: Offline
Points: 30
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sumea Quote  Post ReplyReply Direct Link To This Post Posted: 16 July 2007 at 6:27am
Originally posted by WebCity 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
Back to Top
 Post Reply Post Reply Page  <1234>
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.03
Copyright ©2001-2019 Web Wiz Ltd.


Become a Fan on Facebook Follow us on Twitter Connect with us on LinkedIn Community Forums Web Wiz Blogs Web Wiz News
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Policy

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2021 Web Wiz Ltd. All rights reserved.