Suggestions & Feedback
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsForum InformationSuggestions & Feedback

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
You eat, breathe and sleep innovation. Build your mobile intelligence with BlackBerry® experts this July. Register Today!
  #1  
Old December 12th, 2003, 04:12 AM
Matt Matt is offline
Moderator
Codewalkers Specialist (4000 - 4499 posts)
 
Join Date: Apr 2007
Location: Florida
Posts: 4,158 Matt User rank is Private First Class (20 - 50 Reputation Level)Matt User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 h 10 m 20 sec
Reputation Power: 6
Thoughts on Caching?

I've been thinking about doing a little bit of caching on the forums and was wondering what other people's thoughts were? What I have been contemplating is to cache the main forum view (the one that lists all the forums) for a period of about 3 minutes. This would take quite a few queries off of the database but still allow for frequent updates of the data.

I have also toyed around with the idea of caching the forum views (where the threads are listed), but thought it would be too confusing for people when they posted and then didn't see it show up. I know I could give a message saying "Message will show up in 3 minutes". But I also know it will be ignored.

So, thoughts?

Reply With Quote
  #2  
Old December 12th, 2003, 07:03 AM
zombie zombie is offline
Codewalkers Intermediate (1500 - 1999 posts)
 
Join Date: Apr 2007
Location: serbia
Posts: 1,876 zombie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
RE: Thoughts on Caching?

what about this:

keep a separate cached file for every forum, and regenerate it only when someone posts a message to that forum.

and keep a cached file of forum index, but regenerate it every minute from a cron job.

dont delay for more than a minute, because then, some threads could be missed (eg, when i come to the site, i open all of the forums with new messages in the tabs, and go from there. if user posts at 00:10, and i get at 00:12, and you don't regenerate until 00:14, i will not see that that forum has new messages, and will not open it...)

Reply With Quote
  #3  
Old December 12th, 2003, 09:04 PM
Matt Matt is offline
Moderator
Codewalkers Specialist (4000 - 4499 posts)
 
Join Date: Apr 2007
Location: Florida
Posts: 4,158 Matt User rank is Private First Class (20 - 50 Reputation Level)Matt User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 h 10 m 20 sec
Reputation Power: 6
RE: Thoughts on Caching?

OK...I am now caching the index with a timeout of 1 minute, so it will never be older than 1 minute.

As for each forum, I have it set for a timeout of 30 minutes. However, if a post, reply, or delete happens in that forum the cache is forced to timeout.

Seems to make the loads much quicker

Reply With Quote
  #4  
Old December 12th, 2003, 09:10 PM
Matt Matt is offline
Moderator
Codewalkers Specialist (4000 - 4499 posts)
 
Join Date: Apr 2007
Location: Florida
Posts: 4,158 Matt User rank is Private First Class (20 - 50 Reputation Level)Matt User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 h 10 m 20 sec
Reputation Power: 6
RE: Thoughts on Caching?

Actually...forget I said anything. I have turned it off. I forgot all about the little folder icons being different if there were new messages and the titles being bolded if it was a new message..

I was just caching the html and reusing it for everyone. Obviously, that didn't work well.

I will have a little more time tonight, and then I will cache the actual results from the query and use those to the new messages features will work properly...

Reply With Quote
  #5  
Old December 13th, 2003, 01:58 AM
Matt Matt is offline
Moderator
Codewalkers Specialist (4000 - 4499 posts)
 
Join Date: Apr 2007
Location: Florida
Posts: 4,158 Matt User rank is Private First Class (20 - 50 Reputation Level)Matt User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 h 10 m 20 sec
Reputation Power: 6
RE: Thoughts on Caching?

OK.....it's back on

I am caching the forum index for an indefinate amount of time. It is updated on every post reply or delete though.

Same goes for all the thread indexes.....

Everything seems much faster

Please let me know if you see anything odd...

Reply With Quote
  #6  
Old December 13th, 2003, 03:31 AM
zombie zombie is offline
Codewalkers Intermediate (1500 - 1999 posts)
 
Join Date: Apr 2007
Location: serbia
Posts: 1,876 zombie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
RE: RE: Thoughts on Caching?

Quote:
I will have a little more time tonight, and then I will cache the actual results from the query and use those to the new messages features will work properly...


i thought it was implied from the start that you will do it this way

btw, can you post average loads before and after?

Reply With Quote
  #7  
Old December 13th, 2003, 03:49 AM
bluephoenix's Avatar
bluephoenix bluephoenix is offline
Levelheaded Curmudgeon
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Location: Syracuse, NY
Posts: 507 bluephoenix User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 13 m 2 sec
Reputation Power: 2
Send a message via AIM to bluephoenix
RE: Thoughts on Caching?

You should share this "holy grail" of caching solution with phpclasses.org. All of their mirrors are slow!

-Tim

Reply With Quote
  #8  
Old December 13th, 2003, 06:23 PM
Matt Matt is offline
Moderator
Codewalkers Specialist (4000 - 4499 posts)
 
Join Date: Apr 2007
Location: Florida
Posts: 4,158 Matt User rank is Private First Class (20 - 50 Reputation Level)Matt User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 h 10 m 20 sec
Reputation Power: 6
RE: Thoughts on Caching?

I have noticed that they have been running slow recently...Yesterday none of the DNS for them was even working....

Reply With Quote
  #9  
Old December 14th, 2003, 05:32 AM
bluephoenix's Avatar
bluephoenix bluephoenix is offline
Levelheaded Curmudgeon
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Location: Syracuse, NY
Posts: 507 bluephoenix User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 13 m 2 sec
Reputation Power: 2
Send a message via AIM to bluephoenix
RE: RE: Thoughts on Caching?

Quote:
I have noticed that they have been running slow recently...Yesterday none of the DNS for them was even working....


'Tis sad, really. with all the advertising slots they've sold you'd think they'd have enough for at least 1 good DNS.

-Tim

Reply With Quote
  #10  
Old December 17th, 2003, 03:09 PM
tkarkkainen's Avatar
tkarkkainen tkarkkainen is offline
Moderator
Click here for more information
 
Join Date: Apr 2007
Location: Finland
Posts: 2,320 tkarkkainen User rank is Lance Corporal (50 - 100 Reputation Level)tkarkkainen User rank is Lance Corporal (50 - 100 Reputation Level)tkarkkainen User rank is Lance Corporal (50 - 100 Reputation Level)  Folding Points: 10987 Folding Title: Novice Folder
Time spent in forums: 6 Days 8 h 49 m 26 sec
Reputation Power: 4
RE: RE: Thoughts on Caching?


Quote:
Please let me know if you see anything odd...


If you are on the forums and log in there, you're redirected to the main page. It'd be nice if you could stay on the forums.

Reply With Quote
  #11  
Old December 17th, 2003, 03:16 PM
CodeKadiya CodeKadiya is offline
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: Colombo,Sri Lanka
Posts: 2,313 CodeKadiya User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 4
Send a message via Yahoo to CodeKadiya
RE: Thoughts on Caching?

Oooops! I think it already works like that! Worked for me....

Reply With Quote
  #12  
Old December 17th, 2003, 03:18 PM
Matt Matt is offline
Moderator
Codewalkers Specialist (4000 - 4499 posts)
 
Join Date: Apr 2007
Location: Florida
Posts: 4,158 Matt User rank is Private First Class (20 - 50 Reputation Level)Matt User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 h 10 m 20 sec
Reputation Power: 6
RE: Thoughts on Caching?

Use the login form in the myCodewalker box rather than the eF login form and it will keep you on the same page

Reply With Quote
  #13  
Old December 17th, 2003, 03:21 PM
CodeKadiya CodeKadiya is offline
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: Colombo,Sri Lanka
Posts: 2,313 CodeKadiya User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 4
Send a message via Yahoo to CodeKadiya
RE: Thoughts on Caching?

Yep... Matt is right! When you use myCodewalker box, it keeps you in the same page. No worries.

Reply With Quote
  #14  
Old December 17th, 2003, 06:25 PM
tkarkkainen's Avatar
tkarkkainen tkarkkainen is offline
Moderator
Click here for more information
 
Join Date: Apr 2007
Location: Finland
Posts: 2,320 tkarkkainen User rank is Lance Corporal (50 - 100 Reputation Level)tkarkkainen User rank is Lance Corporal (50 - 100 Reputation Level)tkarkkainen User rank is Lance Corporal (50 - 100 Reputation Level)  Folding Points: 10987 Folding Title: Novice Folder
Time spent in forums: 6 Days 8 h 49 m 26 sec
Reputation Power: 4
RE: RE: Thoughts on Caching?


Quote:
Use the login form in the myCodewalker box rather than the eF login form and it will keep you on the same page


Don't know about you but it doesn't keep ME on the same page

But I'll have to test if it's just one of the features in IE6.

Reply With Quote
  #15  
Old December 17th, 2003, 06:30 PM
tkarkkainen's Avatar
tkarkkainen tkarkkainen is offline
Moderator
Click here for more information
 
Join Date: Apr 2007
Location: Finland
Posts: 2,320 tkarkkainen User rank is Lance Corporal (50 - 100 Reputation Level)tkarkkainen User rank is Lance Corporal (50 - 100 Reputation Level)tkarkkainen User rank is Lance Corporal (50 - 100 Reputation Level)  Folding Points: 10987 Folding Title: Novice Folder
Time spent in forums: 6 Days 8 h 49 m 26 sec
Reputation Power: 4
RE: Thoughts on Caching?

I tried Opera too. After entering my uname and pword I saw a page with this content

Redirected to
Generated by Opera ©

Of course it could be that the ad-blocking system in my firewall did it... Dunno though.

Reply With Quote
Reply

Viewing: Codewalkers ForumsForum InformationSuggestions & Feedback > Thoughts on Caching?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread: