WordPress.org

Forums

WP Super Cache
Homepage goes blank but only on one site on server with 3 sites (10 posts)

  1. Strictly Software
    Member
    Posted 11 months ago #

    Hi

    All my sites use WP Super Cache. Since the last update to WP Super Cache I have noticed on one site my homepage goes blank just out of the blue. I have put reporting in to log memory usage, free memory, PHP memory usage and so on.

    All sites are behind cloudflare - would this cause a problem. Trying to bypass it with my ignore clouflare domain didn't do anything.

    Setting WP-DEBUG to TRUE didn't show ANY FATAL ERRORS at all.

    That's the main crux of the issue. For more detail you can read on and check the sites I have also asked this problem on e.g Stackoverflow and WP Support Forum.

    Hi

    I have had this problem for a while now. I think it maybe due to WP Super Cache although why it would only effect the homepage and not the other sites on my VPS I don't know.

    You can see my stackoverflow question here > http://stackoverflow.com/questions/24847858/blank-pages-on-one-vs-domain-which-an-apache-restart-fixes

    WP Support > https://wordpress.org/support/topic/blank-scree-due-to-memory-allocation-failure?replies=5#post-5807762

    I am on a VPS with 2GB Ram, 4GB VM, behind Cloudflare, ban over 43% of traffic from .htaccess and network rules although I now think due to there not being a Cloudflare repair IP patch for Lenny Linux 5 (old machine I know - not got time to fix at moment) that a lot of these network rules are being ignored as they all come through as Cloudflare.

    In VMIN the info says

    Kernel and CPU Linux 2.6.32.9-rscloud on x86_64 CPU load averages 0.30 (1 min) 0.48 (5 mins) 0.79 (15 mins) Running processes 146 Real memory 2.01 GB total, 956.26 MB used Virtual memory 4 GB total, 503.59 MB used Local disk space 74.81 GB total, 22.54 GB used Package updates All Virtualmin packages are up to date.

    The last post which happened when I checked my email at 6am this Sunday morning showed me an error report at 5.09 (runs at 7 past the hour).

    Full report is at the bottom.

    Hi

    Right I just ran into the white screen of death again on my site.

    Homepage with wp-debug ON said

    Notice: attribute_escape is deprecated since version 2.8! Use esc_attr() instead. in /home/darkpolitricks/public_html/wp-includes/functions.php on line 3078

    Warning: Cannot modify header information - headers already sent by (output started at /home/darkpolitricks/public_html/wp-includes/functions.php:3078) in /home/darkpolitricks/public_html/wp-content/plugins/wp-super-cache/wp-cache-phase2.php on line 91

    No fatal errors on homepage

    when I went to wp-admin / wp-login.php I could login though.

    So I turned the debug back on No errors just warnings e.g

    Notice: Undefined variable: cookies in /home/darkpolitricks/public_html/wp-content/plugins/wp-super-cache/wp-cache-phase1.php on line 660

    Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/darkpolitricks/public_html/wp-content/plugins/wp-super-cache/wp-cache-phase1.php:660) in /home/darkpolitricks/public_html/wp-content/plugins/easy-adsense-lite/EzTran.php on line 196

    Notice: attribute_escape is deprecated since version 2.8! Use esc_attr() instead. in /home/darkpolitricks/public_html/wp-includes/functions.php on line 3078

    Notice: register_sidebar_widget is deprecated since version 2.8! Use wp_register_sidebar_widget() instead. in /home/darkpolitricks/public_html/wp-includes/functions.php on line 3078

    This is a theme my mate put together based on Carrington Blog I don't know if these warnings are important but they don't cause issues most of the time.

    No Errors or Fatal Errors could be seen in the back end.

    At the same time note all my other sites on the same server were working fine.

    I tried my "bypass" cloudflare domain e.g rob.example.com but that didn't do anything.

    As always a restart of Apache fixed this one site again.

    Here is output I got during the time the homepage/front end was blank from the server.

    I ran a TOP ignoring Zombie processes e.g top -i -H

    Results 06:02:47 up 16 days, 3:05, 1 user, load average: 1.12, 1.05, 1.14 Tasks: 136 total, 2 running, 134 sleeping, 0 stopped, 0 zombie Cpu(s): 4.4%us, 1.8%sy, 0.0%ni, 49.0%id, 44.7%wa, 0.0%hi, 0.0%si, 0.1%st Mem: 2109548k total, 2015788k used, 93760k free, 9332k buffers Swap: 4194296k total, 504124k used, 3690172k free, 1094764k cached

    PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 20297 www-data 20 0 283m 47m 29m D 5 2.3 0:00.19 apache2 75 root 20 0 0 0 0 R 0 0.0 0:18.88 kblockd/0 1901 root 20 0 0 0 0 D 0 0.0 13:19.73 flush-8:1 679 mysql 20 0 656m 289m 2368 D 0 14.0 6:26.27 mysqld 20296 root 20 0 18888 1280 944 R 0 0.1 0:00.00 top

    A free command

    total used free shared buffers cached
    Mem: 2109548 1767116 342432 0 6376 920084 -/+ buffers/cache: 840656 1268892 Swap: 4194296 504092 3690204

    This shows me that there wad memory about and not many apache processes.

    I then got the results of my scheduled system report (which kicked it all off otherwise I wouldn't have know the site was down)

    System Report: 2014-07-20 05:09:00

    Initiating System Report...
    Using Strictly System Check Version: 1.0.8
    Initiating an HTTP request to http://www.example.com
    The HTTP request to http://www.example.com took 1 second(s) to respond and returned a status code of 500
    The specified search text read more could not be located within the HTTP response
    The server is running under the user of www-data
    The server load is currently 0.36
    The server load is okay
    Your available server memory is 2.00GB
    Your current server memory usaage was 91.51%
    Your available disk swap memory is 4GB
    Your disk swap memory usage is 14.93%
    MySQL DB Real Memory Size: 235.63MB
    The PHP Memory usage at the time of the report was 1.25MB

    MySQL has been running for: 16 days 2 hours 9 mins 40 secs
    Total Connections: 605071 - Aborted: 0 - Connections Per Hour 1566
    Total Queries: 33838003 - Queries / Per Hour 87626
    Joins without indexes: 0 - Joins without indexes Per Hour 0
    Total Reads: 5768028 (88%) - Total Writes 733689 (12%)
    Initiating a check for corrupt tables and indexes
    Table: wp_commentmeta does not need repairing
    Table: wp_comments does not need repairing
    Table: wp_links does not need repairing
    Table: wp_options does not need repairing
    Table: wp_postmeta does not need repairing
    Table: wp_posts does not need repairing
    Table: wp_term_relationships does not need repairing
    Table: wp_term_taxonomy does not need repairing
    Table: wp_terms does not need repairing
    Table: wp_usermeta does not need repairing
    Table: wp_users does not need repairing
    Table: wp_wbz404_logs does not need repairing
    Table: wp_wbz404_redirects does not need repairing
    Table: wp_wpo_campaign does not need repairing
    Table: wp_wpo_campaign_category does not need repairing
    Table: wp_wpo_campaign_feed does not need repairing
    Table: wp_wpo_campaign_post does not need repairing
    Table: wp_wpo_campaign_word does not need repairing
    Table: wp_wpo_log does not need repairing
    No repairing of tables was required
    Completed check for corrupt tables and indexes
    The system is currently configured to accept a maximum of 25 database connections
    At the time of reporting the database was running 1 query
    The current database load is 4%
    The database load is okay
    The system is not set up to OPTIMIZE the tables or the server load of 0.36 was below the threshold for an OPTIMIZE of 15.
    The system report concludes that the site is having problems and requires some immediate attention.

    An email is being sent to me@example.com

    Report Completed At 2014-07-20 05:09:00

    Strictly Software Plugins for WordPress

    So this happens out of the blue and a restart of Apache fixes it always.

    I am guessing due to security and the fact I am using www-data to init the call a blank screen of death cannot be fixed with a restart of apache automatically using shell_exec. Maybe I need a demon running on the server to do similar checks and then run it - horrible idea though - want to fix underlying problem.

    Must BE some PHP script or service killing the system (only one - others work on same server)

    Therefore I am at a loss.

    The only errors in the log file for that time period were client denied (firewall blocks) e.g

    [Sun Jul 20 04:36:12 2014] [error] [client 188.114.99.241] client denied by server configuration: /home/mysite/public_html/2013, referer: https://www.google.com/ [Sun Jul 20 05:16:46 2014] [error] [client 188.114.102.125] client denied by server configuration: /home/mysite/public_html/xmlrpc.php [Sun Jul 20 05:31:56 2014] [error] [client 188.114.99.232] client denied by server configuration: /home/mysite/public_html/wp-content/plugins/wp-o-matic/cache/4f002_http4.bp.blogspot.com-A81P4mnlJ2cUnv41979RKIAAAAAAABAU4AZk14sNBKBs329.jpg [Sun Jul 20 05:56:49 2014] [error] [client 188.114.102.142] client denied by server configuration: /home/mysite/public_html/comments

    188.114.102.142 is a cloudflare IP addresss.

    As my box is old and I don't have the time there is not a Lenny patch from Cloudflare to get the IPS returned to their normal IPS in the files etc.

    I do have the WP Clouflare plugin installed that does Akismet though (and just that I believe).

    My report is scheduled to run at 7 past the hour. So I checked access logs.

    Everything running fine

    108.162.215.198 - - [20/Jul/2014:04:49:23 +0100] "GET / HTTP/1.1" 200 38027 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8" 0/927136 108.162.212.192 - - [20/Jul/2014:04:55:12 +0100] "GET / HTTP/1.1" 301 144 "-" "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)" 0/348030 108.162.212.51 - - [20/Jul/2014:04:55:13 +0100] "GET / HTTP/1.1" 200 38030 "-" "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)" 0/932853 108.162.221.68 - - [20/Jul/2014:04:55:19 +0100] "GET / HTTP/1.1" 403 325 "-" "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.19; aggregator:Spinn3r (Spinn3r 3.1); http://spinn3r.com/robot) Gecko/2010040121 Firefox/3.0.19" 0/26488 108.162.216.160 - - [20/Jul/2014:05:00:58 +0100] "GET / HTTP/1.1" 301 144 "-" "Feedfetcher-Google; (+http://www.google.com/feedfetcher.html; 1 subscribers; feed-id=16799781611961306038)" 0/805170 173.245.55.70 - - [20/Jul/2014:05:01:00 +0100] "GET / HTTP/1.1" 500 20 "-" "Feedfetcher-Google; (+http://www.google.com/feedfetcher.html; 1 subscribers; feed-id=16799781611961306038)" 1/1210085

    then this request which was given a 403 forbidden

    108.162.221.68 - - [20/Jul/2014:04:55:19 +0100] "GET / HTTP/1.1" 403 325 "-" "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.19; aggregator:Spinn3r (Spinn3r 3.1); http://spinn3r.com/robot) Gecko/2010040121 Firefox/3.0.19" 0/26488

    then all 500 status codes to the homepage until I rebooted

    108.162.216.160 - - [20/Jul/2014:05:00:58 +0100] "GET / HTTP/1.1" 301 144 "-" "Feedfetcher-Google; (+http://www.google.com/feedfetcher.html; 1 subscribers; feed-id=16799781611961306038)" 0/805170 173.245.55.70 - - [20/Jul/2014:05:01:00 +0100] "GET / HTTP/1.1" 500 20 "-" "Feedfetcher-Google; (+http://www.google.com/feedfetcher.html; 1 subscribers; feed-id=16799781611961306038)" 1/1210085 173.245.55.70 - - [20/Jul/2014:05:02:01 +0100] "GET / HTTP/1.1" 500 20 "-" "Feedfetcher-Google; (+http://www.google.com/feedfetcher.html; 1 subscribers; feed-id=16799781611961306038)" 1/1188995 173.245.55.70 - - [20/Jul/2014:05:03:03 +0100] "GET / HTTP/1.1" 500 20 "-" "Feedfetcher-Google; (+http://www.google.com/feedfetcher.html; 1 subscribers; feed-id=16799781611961306038)" 1/1155199 173.245.55.70 - - [20/Jul/2014:05:04:04 +0100] "GET / HTTP/1.1" 500 20 "-" "Feedfetcher-Google; (+http://www.google.com/feedfetcher.html; 1 subscribers; feed-id=16799781611961306038)" 1/1133494 173.245.54.199 - - [20/Jul/2014:05:06:17 +0100] "GET / HTTP/1.1" 500 20 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/534.59.10 (KHTML, like Gecko) Version/5.1.9 Safari/534.59.10" 1/1156219 108.162.245.42 - - [20/Jul/2014:05:07:00 +0100] "GET / HTTP/1.1" 500 20 "-" "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)" 1/1207917 173.245.55.163 - - [20/Jul/2014:05:07:01 +0100] "GET / HTTP/1.1" 500 20 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.75 Safari/537.1" 1/1190563 173.245.55.70 - - [20/Jul/2014:05:08:20 +0100] "GET / HTTP/1.1" 500 20 "-" "Feedfetcher-Google; (+http://www.google.com/feedfetcher.html; 1 subscribers; feed-id=16675227896629445363)" 2/2765042

    me restarting Apache

    86.2.70.21 - - [20/Jul/2014:06:17:57 +0100] "GET / HTTP/1.1" 500 20 "-" "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:30.0) Gecko/20100101 Firefox/30.0" 1/1176223

    All 200's to the homepage OR 403s where i have banned in .htaccess the robot

    141.101.99.192 - - [20/Jul/2014:06:19:41 +0100] "GET / HTTP/1.1" 200 38035 "-" "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36" 1/1087529 108.162.215.243 - - [20/Jul/2014:06:23:36 +0100] "GET / HTTP/1.1" 200 37137 "-" "Mozilla/4.0 (compatible; MSIE 6.1; Windows NT)" 4/4362257 108.162.215.243 - - [20/Jul/2014:06:23:39 +0100] "GET / HTTP/1.1" 200 37136 "-" "Mozilla/4.0 (compatible; MSIE 6.1; Windows NT)" 1/1161635 199.27.128.160 - - [20/Jul/2014:06:23:41 +0100] "GET / HTTP/1.1" 403 325 "http://www.baidu.com/search/spider.htm" "Mozilla/5.0 (compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.html)" 0/26806 108.162.221.68 - - [20/Jul/2014:06:25:48 +0100] "GET / HTTP/1.1" 403 325 "-" "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.19; aggregator:Spinn3r (Spinn3r 3.1); http://spinn3r.com/robot) Gecko/2010040121 Firefox/3.0.19" 0/27637 108.162.222.160 - - [20/Jul/2014:06:28:06 +0100] "GET / HTTP/1.1" 403 322 "-" "Mozilla/5.0 (compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.html)" 0/25588 173.245.55.182 - - [20/Jul/2014:06:35:28 +0100] "GET / HTTP/1.1" 200 24073 "-" "Mozilla/5.0 (iPhone; CPU iPhone OS 7_1_1 like Mac OS X) AppleWebKit/537.51.2 (KHTML, like Gecko) Version/7.0 Mobile/11D201 Safari/9537.53" 2/2279796

    time of my report

    108.162.245.42 - - [20/Jul/2014:05:07:00 +0100] "GET / HTTP/1.1" 500 20 "-" "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)" 1/1207917 173.245.55.163 - - [20/Jul/2014:05:07:01 +0100] "GET / HTTP/1.1" 500 20 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.75 Safari/537.1" 1/1190563

    However I did notice that this seemed to effect the homepage rather than other pages e.g requests to actual pages or posts were still having 200 status codes returned during this period of activity.

    So maybe it is something to do with WP Super Cache and the home page? Or cloudflare and the homepage? I cannot see a PHP page call or process that would have stopped the system unless there is another log somewhere that logs not just errors or apache requests but underlying SSH requests, DOS hack attempts and non web traffic related requests,

    Any help would be very much appreciated to get to the bottom of this.

    Thanks

    Rob

    https://wordpress.org/plugins/wp-super-cache/

  2. Richard Archambault
    Happiness Engineer
    Plugin Author

    Posted 11 months ago #

    Hi!

    A couple of questions for you:

    1) do you have this line in your wp-config.php file?

    http://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP

    2) do you have a value for memory_limit in your php.ini?

  3. Strictly Software
    Member
    Posted 11 months ago #

    1. No

    2. Yes it's

    memory_limit: 32M

    I don't believe in just throwing memory at problems I'd rather get to the bottom of them. Sometimes I might increase the memory when I need to like in my sitemap plugin but that is only so it rises as the size of the data and file rises so its a linear raise.

    I have been told by a couple of other people Rackspace / Cloudflare that it sounds like a WP Super Csche issue. For some reason it just isn't caching the homepage for some reason.

    I don't want to chop and change disk based caching constantly but if it is can you recommend a better caching plugin.

    Thanks

    Rob

  4. mbrsolution
    Member
    Posted 11 months ago #

    Hi @Rob you could carry out a test. Increase your memory limit to a higher number and test. If it does not change then you know that increasing the memory limit had no effect.

    Kind regards

  5. Strictly Software
    Member
    Posted 11 months ago #

    Hi

    The problem is that this does NOT happen ALL the time. Only intermittently and I don't know the factors that cause this to happen.

    This is why I am using my Strictly System Checker plugin to give me reports by email when it thinks the site is in trouble e.g a 500 error, no specified text found on page, too much server load, too long to load the page and so on. When I get an email I go and search the page.

    You can read above and see a full report that I had when the homepage was last blank. As you can see I do record the main memory values, RAM, PHP Usage, Disk Swap and so on.

    Initiating an HTTP request to http://www.example.com
    The HTTP request to http://www.example.com took 1 second(s) to respond and returned a status code of 500
    The specified search text read more could not be located within the HTTP response
    The server is running under the user of www-data
    The server load is currently 0.36
    The server load is okay
    Your available server memory is 2.00GB
    Your current server memory usaage was 91.51%
    Your available disk swap memory is 4GB
    Your disk swap memory usage is 14.93%
    MySQL DB Real Memory Size: 235.63MB
    The PHP Memory usage at the time of the report was 1.25MB

    MySQL has been running for: 16 days 2 hours 9 mins 40 secs
    Total Connections: 605071 - Aborted: 0 - Connections Per Hour 1566
    Total Queries: 33838003 - Queries / Per Hour 87626

    And so on.

    I don't want to just throw memory at the problem as that doesn't get to the underlying problem.

    So just adding extra memory won't help me find why the homepage is blank sometimes when other pages on the site work fine.

    I asked before but no-one answered

    should I have "Extra homepage checks. (Very occasionally stops homepage caching) (Recommended)" ON or OFF?

    should I have "Coarse file locking. You probably don’t need this but it may help if your server is underpowered. Warning! May cause your server to lock up in very rare cases!" ON or OFF?

    And what about all the other settings?

    Don’t cache pages for known users. (Recommended)
    Don’t cache pages with GET parameters. (?x=y at the end of a url)
    Make known users anonymous so they’re served supercached static files.
    Cache rebuild. Serve a supercache file to anonymous users while a new file is being generated. (Recommended)

    and so on?

    What should I have turned on and off.

    I am already compressing my code with Apache so there is no point in having the "Compress pages so they’re served more quickly to visitors. (Recommended)" enabled is there?

    So I cannot replicate this bug on demand Im afraid.

    Help much appreciated!

  6. Richard Archambault
    Happiness Engineer
    Plugin Author

    Posted 11 months ago #

    Hi,

    At the moment, I'm not convinced that WP Super Cache is the source of your problem. To me it looks like your site runs out of memory (the PHP limit of 32MB is a bit low for any large-ish WordPress that runs several plugins). What happens if you leave WP Super Cache for a few days? Does this happen again?

  7. Strictly Software
    Member
    Posted 10 months ago #

    Hi

    Thanks for getting back to me and sorry for the amount of questions I am going to throw out here :)

    Okay what do you suggest the value of the PHP limit should be for a site that is quite big and does get a lot of traffic?

    I've just managed to hack the cloudflare module for an old server and get it working by adding it direct to my apache config so now all my old network firewall rules that helped me ban over 50% of traffic (bots,spam,hackers,proxies) are now back and working. Whether this has helped or not I don't know. One thing I do know is that the price of my bandwidth usage went UP after I started using Cloudflare despite all their graphs telling me how much they had saved so I am guessing because all site traffic (even those I had banned manually in IPtables) were coming through cloudflares proxies it meant they were not being banned as cloudflare thought they were ok even when I didn't e.g all the social media bots that just track twitter and scan sites stealing bandwidth for their custom "newspapers" etc.

    Also does anyone know how do ADD a custom homepage I made (this is a different site) TO a caching plugin like WP Super Cache. The reason I made the page custom was that I could hardcode a lot of the widgety cache stuff like side bars full of banners, and other code as pure HTML. Also certain sections of my page are all obtained from different 3rd parties using XML.

    E.G I have a custom box for latest news which I get the 2 top new articles out and show X chars. Formatted and also add the titles to a scroller widget I made for the top of the page.

    Also I have widgets that need to get the latest horse prices for the next race AND also one that gets the results from previous race. also the time to the next race which is used as a countdown clock on the homepage.

    I basically made my own caching plugin that for each section it checks for an HTML file in a directory I made. Checks the age of it. If it's under X seconds old I just show the HTML. Otherwise I call my API code, get the XML,JSON etc and build a new piece of HTML. This is then cached and returned to the homepage.

    The problem is that it can be a bit slow to load at times and I want to make it fast as possible, I am guessing lots of little widgety caches are the cause??

    You can see it here if you want http://www.ukhorseracingtipster.com/

    What I would like to do is GET all the bits n bobs at ONE time and then build a static HTML file to be used as the homepage. I could write the code myself but I was wondering if there was a way of adding custom PHP pages INTO WP Super Cache on demand e.g a function to add the HTML or URL passed to it etc.

    Also any other tips about the best way to handle caching yourself. E.G at the moment I am just checking the date, if its old, getting new data, then returning it, then caching it. Using basic file_get_contents etc. Maybe I need some more sophisticated way of caching?

    Thanks for your help and if you have different vars for php memory size let me know

  8. Brandon Kraft
    Happiness Engineer
    Plugin Author

    Posted 10 months ago #

    For the memory size, whatever your host will give you ;-). In seriousness, mine are typically set in the 96M ballpark. This much memory isn't used each time, just the limit of what is available. It needs to be large enough to bring in all of the PHP (and work from the PHP files) into active memory.

    If you set your homepage as a WordPress template and have your site call on it, WP Super Cache will pick it up (front-page.php is the template file that will be used for your home page no matter what your Settings->Reading option is set to). For the static elements, you could have the API values stored as WordPress transients, which would cache them from the API.

  9. Strictly Software
    Member
    Posted 10 months ago #

    Ok thanks for this I have done that and I am waiting to see if I get any more problems.

    I also found an issue with Cloudflare SmartErrors and WP Plugin Updater as it would always give a /404 when trying to update a plugin an take you to the smart errors page.

    Disabled that til they can fix it.

    Thanks

    Rob

  10. Strictly Software
    Member
    Posted 10 months ago #

    Oh and by the way I cannot really set the homepage as a template and then get it cached in the normal way because (and if there are fixes I would love to know)

    1. I want to have a different cache length (until reload) for this than all other pages e.g 60 seconds. At the moment I use meta refreshes to ensure the page is reloaded frequently if people stay on it as news about markets, winners, prices and so on change a lot.

    2. I have parts of the page which include countdowns (JS) to the next race e.g 00:23:45 and when the countdown hits 00:00:00 I use JS to reload the page in with a window.location.href. If the page reloaded but was still a cached page and had all the same info on it including the date and time of the next race then this would look silly. E.G 00:23 seconds until the race at Cheptstow 16:45. If the page reloaded and didn't come back with the "next" race e.g 00:15:00 until the 17:00 at Kempton then I would be in trouble.

    3. Obviously the news, winners and losers and next market prices are all loaded at the moment every minute or so but if the page re-cached and didn't show new market prices/results this would also be a problem.

    You can see the page here > http://www.ukhorseracingtipster.com/

    I am trying to speed it up as much as possible but I don't want to degrade png images (header), already behind Cloudlfare with async (rocketscript), and gzipped etc with images,css cache headers and so on. However it is very hard to get a very good page score with Google Page Speed as they don't take Cloudflare rocketscript into consideration as being scripts loaded in async etc. Also I am chipping away at the code as much as possible so JS, plugin code not used on the homepage is being removed bit by bit. However because of these "widget" caches all having different times they could either be all loaded together at once or just have one section loaded.

    Any ideas would be great. Especially if I DO have to continue caching my own sections of HTML the best way of ensuring the code is cached without locks, freezes due to 2 people accessing the file/page at the same time and so on.

    Thanks

Reply

You must log in to post.

About this Plugin

  • WP Super Cache
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic