1
turnerrw
Caching Techniques & News Module
  • 2005/2/16 15:40

  • turnerrw

  • Just popping in

  • Posts: 68

  • Since: 2003/12/1


I've been using XOOPS for a news portal site since Jan '04 with no caching enabled. Recently, I noticed severe performance problems with the site with MySQL consuming most of the CPU resources and Load averages way out of line.

So ... I enabled caching for most modules and blocks and the server seemed to calm down quite a bit.

One of our key metrics that we like to pay attention to regulary is reader count for News articles. However, now that I've enabled a 30 minute cache of the News module, I've noticed that my reader counts don't increment with each hit - I guess that makes sense.

QUESTIONS:
1. Is there anyway to keep the benefits of cache with this module and still gather this stat?

2. Is there something else I should be considering? What is a good time period for caching this module?

News is my primary module where 80% of my content lives.

Thanks in advance for your advice.

Cheers,
-Robert

2
Mithrandir
Re: Caching Techniques & News Module

1. The stats are still being gathered, they are just not being updated until next cache update - i.e. after 30 minutes

2. Good time periods vary on the frequence of content addition. Depending on the traffic, you can set the caching time high or low. Setting it high will give the best performance, but also means that your site will not be updated that often. For very high load sites, this is perhaps a good trade-off. On the other hand, if you have a site with loads of traffic, it might not matter *that* much if the page load times is a bit higher every 15 minutes or every 30 minutes

3
turnerrw
Re: Caching Techniques & News Module
  • 2005/2/16 16:10

  • turnerrw

  • Just popping in

  • Posts: 68

  • Since: 2003/12/1


Are you sure the stats are still being gathered?

My observation says that this is not happening when the module is in cache. The most recent article on the site should have several hundred reads by this point and the read counter is currently at 40.

I just ran a test and from the news summary page an article had a read count of 42. When I clicked the title and read the article in full-page mode the read count displayed 41.

Before I enabled cache for this module, clicking an article link would increment the counter before displaying the story.

4
Mithrandir
Re: Caching Techniques & News Module

Try this:

1. Access an article several times
2. Go to the News module preferences and just submit the form (you don't have to change anything - this will clear the cached files)
3. Go back to the article and see if the counter has changed

5
turnerrw
Re: Caching Techniques & News Module
  • 2005/2/16 16:24

  • turnerrw

  • Just popping in

  • Posts: 68

  • Since: 2003/12/1


Ok - I did the test.

I read a story 4 times - the read count went from 41 to 42 during my clicking.

I reset the prefes in Admin - News - Preferences.

When I read the story again, the count displayed 43.

That's at least 3 reads that were not counted.

6
Mithrandir
Re: Caching Techniques & News Module

Ahhh - you are using News 1.1, distributed with the core?

This counter problem was fixed in News 1.2

7
turnerrw
Re: Caching Techniques & News Module
  • 2005/2/16 17:34

  • turnerrw

  • Just popping in

  • Posts: 68

  • Since: 2003/12/1


OK - good stuff ... thanks for the tip on the module upgrade.

Just got a note from one of my regular users who says he can't post News comments after logging in. I think he's a victim of News cache as well (i.e. he's logging in butting getting a cached page without the Post Comment button).

Was this also fixed in the upgrade? Seems like I'll have to disable cache on this module.

8
DobePhat
Re: Caching Techniques & News Module
  • 2005/2/16 17:38

  • DobePhat

  • Friend of XOOPS

  • Posts: 656

  • Since: 2003/4/15


Hmm yes, cache has never worked for me. Especially in the News Module.

Randir:

can we update the news module by itself?
ie: I use XOOPS 2.0.7 on most of our sites and dont want XOOPS later versions because of some module conflicts (at this time, eventually though).

Where is this news version you speak of?

Thanks!

9
Mithrandir
Re: Caching Techniques & News Module


Login

Who's Online

280 user(s) are online (221 user(s) are browsing Support Forums)


Members: 0


Guests: 280


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits