1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Buying Some pre-caching code...read the explanation for more.

Discussion in 'Programming' started by pontifixx, Mar 17, 2010.

  1. #1
    Hello fellow DPr's!

    I run a site named NHLWatch.com that runs on WordPress and uses the OneNews Premium theme (which essentially copies the function and look of popurls.com).

    If you visit the site, you'll notice it takes anywhere from 30 seconds to 2 minutes to load the site up the first time for anyone visiting the site. It currently pulls data from almost 150 rss feeds. I think that is what is causing it to take so long to load up. I already use the "Hyper Cache" plugin, and yes, I've tried both the "W3 Total Cache" as well as "WP Super Cache" none of which were able to produce any time savings on the initial load.

    I am thinking that I need a way for the site to run all the queries to the feeds ahead of time, or maybe once every 30 minutes or so - that way the first time a user hits the site, they will get the cached version of the feed results. If I can get this to work, then I would simply add a "refresh" button for the reader to click on to get the latest results.

    I'm not sure if this is a MySQL, PHP or Wordpress issue.

    I can only afford $100, so let me know if you're interested.

    Thanks!

    Paul
     
    pontifixx, Mar 17, 2010 IP
  2. hangbowl

    hangbowl Well-Known Member

    Messages:
    228
    Likes Received:
    3
    Best Answers:
    4
    Trophy Points:
    143
    Digital Goods:
    2
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #2
    your site is toooo long to load :D
    i'll contact you when it's finish to load
     
    hangbowl, Mar 17, 2010 IP
  3. risoknop

    risoknop Peon

    Messages:
    914
    Likes Received:
    24
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #3
    You need to set up a cron job that will run like every hour in the backround and fetch all RSS files into cache. Then just load all feeds from the cache. That will eliminate that 30s delay on first visit.
     
    risoknop, Mar 17, 2010 IP
  4. pontifixx

    pontifixx Member

    Messages:
    89
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    43
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #4
    Thanks for the quick replies, very useful!
     
    pontifixx, Mar 17, 2010 IP
  5. Steve136

    Steve136 Peon

    Messages:
    240
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #5
    Hi

    If the feeds are being loaded with a custom plugin, the current WP cache plugins won't touch it - So all the feeds will still be live. You shouldn't need to setup any cron-jobs or anything, just make sure the cache expires on 30minute intervals; what's the point fetching data if no one if currently viewing the site.

    You may want to take a look at Memcached; you can use it with PHP to make your own cache server and get content directly from that - Other large sites (such as Facebook) use it. However, if you are on shared web hosting I doubt that it will be possible to install it on your own and quite possibly the host will try and charge you. There are other PHP cache libraries that will work though.

    If you want I'll take a look at it for you. Drop me a PM.

    Regards,
    Steve
     
    Steve136, Mar 17, 2010 IP