Jump to content


These Forums Are Now Read-Only


For TubePress support, please post a question here or open a support ticket and we will be glad to assist.


Photo

Using Multiple Playlists

wordpress youtube

  • Please log in to reply
7 replies to this topic

#1 James Israel

James Israel

    Advanced Member

  • Members
  • PipPipPip
  • 132 posts
  • LocationSacramento, CA

Posted 13 May 2013 - 02:10 PM

Hello,

 

I've discussed this at length with you before, but I don't see the topic anymore, maybe you closed it. In any case, I'd like to revive it.

 

We were talking about ways to get multiple playlists from YouTube to work well in a Tubepress installation. I'm using a LOT of playlists, so the issue is that it takes a while to gather all the info from YouTube and display the thumbnails.

 

You said you were working on some coding to help with the issue. Have you come up with anything on that yet?

 

Otherwise, you were saying I could set up a cron job to bring up the page periodically, thus creating a pre-cache of the page that could be fed to people coming to the page for the first time.

 

I have done so with the "Run External Crons" plugin. However, I don't know if I've set the interval at a good timespan, and don't know how to verify that the cron jobs are actually happening as set up.

 

I have the interval for one page set up at 3600 seconds (http://www.humortime...l-humor-videos/) and another at 3556 seconds (staggering them, so they don't occur at the same time).

 

I'm using W3T Cache, and have Cache Preload set at 900 seconds, 10 pages per interval. Since that will preload the cache of 10 pages every 900 seconds, and we have tons of pages, I don't know how often it'll actually preload the video pages, but I figure it's got to be a longer interval than I have set up for the cron job -- so that should be ok, right?

 

Anyway, the example page I gave above still takes a long time to load (about 10-15 seconds). I would like to know if that's because the cron thing is not working as hoped, or what. Do you know how I can see if the cron jobs are happening, and if the cache preload is working as it should? If I could test those things, I would know whether this whole thing is do-able or not.

 

Thanks for your help.

 

PS: Found the other thread, the subject is: "Multiple sources, too many videos per page, wrong sort"



#2 eric

eric

    Lead Developer

  • TubePress Staff
  • 2787 posts

Posted 14 May 2013 - 01:26 PM

Hello again!

 

You said you were working on some coding to help with the issue. Have you come up with anything on that yet?

 

Sadly not yet. We have definitely not forgotten this feature - it's on our internal task list. Unfortunately that's all the info I have at the moment.

 

 

Otherwise, you were saying I could set up a cron job to bring up the page periodically, thus creating a pre-cache of the page that could be fed to people coming to the page for the first time.

 

I have done so with the "Run External Crons" plugin. However, I don't know if I've set the interval at a good timespan, and don't know how to verify that the cron jobs are actually happening as set up.

 

I have the interval for one page set up at 3600 seconds (http://www.humortime...l-humor-videos/) and another at 3556 seconds (staggering them, so they don't occur at the same time).

 

I'm using W3T Cache, and have Cache Preload set at 900 seconds, 10 pages per interval. Since that will preload the cache of 10 pages every 900 seconds, and we have tons of pages, I don't know how often it'll actually preload the video pages, but I figure it's got to be a longer interval than I have set up for the cron job -- so that should be ok, right?

 

Anyway, the example page I gave above still takes a long time to load (about 10-15 seconds). I would like to know if that's because the cron thing is not working as hoped, or what. Do you know how I can see if the cron jobs are happening, and if the cache preload is working as it should? If I could test those things, I would know whether this whole thing is do-able or not.

 

Putting aside the cron questions for a moment, the first thing I would want to check is whether or not W3TC is configured and operating normally. Your site is sitting behind CloudFlare (good!), and CloudFlare might be stripping out the HTML comments that W3TC inserts. You could also look inside wp-content/w3tc/pgcache/. Make sure that the files in there have recent timestamps and contain real caches of your pages. W3TC can be difficult to configure on some servers, so I want to just double-check that it's doing its job.

 

The next thing I would check is to make sure that TubePress's API cache is operating correctly. You can do this by (temporarily) enabling debugging from WP Admin > Settings > TubePress > Advanced. Look in your TubePress debug output for a line that starts with "Cache has ...". If you see "Skip cache" or "Cache does not have" then we know that something is wrong.

 

As for the cron job, I'm not familiar with the "Run External Crons" plugin but it seems straightforward enough. Could you post the actual cron commands that you are running? That will help us come up with a way to verify that they are actually run correctly.

 

Thanks!



#3 James Israel

James Israel

    Advanced Member

  • Members
  • PipPipPip
  • 132 posts
  • LocationSacramento, CA

Posted 14 May 2013 - 02:13 PM

Where do I look for these wt3c comments? There are no files in the pgcache folder at all, though it is writeable.

 

Everytime I try turning on the API cache anymore, it breaks the site, Cloudflare says it's unreachable.



#4 eric

eric

    Lead Developer

  • TubePress Staff
  • 2787 posts

Posted 14 May 2013 - 04:38 PM

Where do I look for these wt3c comments? There are no files in the pgcache folder at all, though it is writeable.

 

Everytime I try turning on the API cache anymore, it breaks the site, Cloudflare says it's unreachable.

 

As an example, view the HTML source for this page: http://www.chiefly.org/. Scroll way to the bottom and you'll see the comments that W3TC inserts. See them?



#5 James Israel

James Israel

    Advanced Member

  • Members
  • PipPipPip
  • 132 posts
  • LocationSacramento, CA

Posted 14 May 2013 - 05:06 PM

I do have to put Cloudflare in 'development mode' to see it. It says:

 

<!-- Served from: www.humortimes.com @ 2013-05-14 16:07:32 by W3 Total Cache -->

<!-- W3 Total Cache: Page cache debug info:
Engine: disk: enhanced
Cache key: www.humortimes.com/videos/1802-funny-videos/_index.html
Caching: enabled
Creation Time: 6.113s
Header info:
Last-Modified: Tue, 14 May 2013 23:07:32 GMT
Expires: Wed, 15 May 2013 00:07:32 GMT
Pragma: public
Cache-Control: max-age=3600, public, must-revalidate, proxy-revalidate
X-Powered-By: W3 Total Cache/0.9.2.10
Vary:
X-Pingback: http://www.humortimes.com/xmlrpc.php
Content-Type: text/html; charset=UTF-8
-->

 

Still no files in the wp-content/w3tc/pgcache folder, but there are fresh files in the wp-content/cache/page_enhanced/www.humortimes.com folder.

.



#6 eric

eric

    Lead Developer

  • TubePress Staff
  • 2787 posts

Posted 15 May 2013 - 05:24 PM

That looks very good - from what I can tell, W3TC is doing its job properly.

 

Did you have a chance to try the new TubePress API cache setting as we talked about in this thread?



#7 James Israel

James Israel

    Advanced Member

  • Members
  • PipPipPip
  • 132 posts
  • LocationSacramento, CA

Posted 15 May 2013 - 07:03 PM

Ok, I set the field to blank as you said in the other thread, and it seems to be working fine now (must've missed that before, sorry). Is there a way to check if it's really caching though? And do you think 3600 seconds is a good setting for it?

 

Also, do you know why w3tc is not storing cache files in the wp-content/w3tc/pgcache folder? I do have Page Cache on. Could the cache preload files be in the wp-content/cache/page_enhanced/www.humortimes.com folder instead?

 

Also, do you think the "Cache-Control: max-age=3600, public, must-revalidate, proxy-revalidate" is the best setting in w3tc? I've read up on it, but seen conflicting advice.

 

One last thing - I know w3tc isn't your plugin, but you seem to know it pretty well, so I'll ask this too: I have a dedicated server, so do you know if the Page Cache would be better set on the 'Opcode' setting rather than 'Disk enhanced'?

 

Thanks!



#8 James Israel

James Israel

    Advanced Member

  • Members
  • PipPipPip
  • 132 posts
  • LocationSacramento, CA

Posted 21 May 2013 - 10:08 PM

My tubepress pages are working much better now.

 

I think it was a combination of things. One, I got the Tubepress API cache working, as noted above. Two, I'm using more YouTube user names (userValue=) in the Tubepress code, as opposed to playlists. That seems to work quicker, but I'm sacrificing the ability to narrow down to just the types of videos I want, which is a problem for the quality of the video galleries, I think. Three, I split up the one page into three pages, so Tubepress only has to call up a third of what it was doing. (It's actually calling up a lot less than that, due to the change to userValue vs playlistValue.)

 

Lastly, I've set up the cron jobs to call up the pages every hour, to preload the cache. I'm not sure how much this is really helping, though. I'd love to get the questions from my last post above answered, to help me discern what is going on with the Cache Preload.

 

I still feel it would be great if Tubepress were more efficient at picking up individual playlists, as I think it would make a big improvement.

 

Any help with understanding and setting up the Cache Preload in w3tc would be much appreciated. I've asked in their forum, but can't seem to get any help.

 

Thanks for your help.