Want more timely Centmin Mod News Updates?
Become a Member

Wordpress Cache-Enabler Plugin WP Cacher Enabler Plugin by KeyCDN folks

Discussion in 'Blogs & CMS usage' started by eva2000, Dec 2, 2015.

  1. Matt Williams

    Matt Williams WordPress Fanatic

    537
    104
    43
    Nov 22, 2014
    Virginia, USA
    Ratings:
    +157
    Local Time:
    6:26 PM
    latest
    10
    I agree with @RoldanLT ! Much easier to setup - I only use it for small sites or a VM with multiple sites now. I mostly use Redis cache.

     
  2. eva2000

    eva2000 Administrator Staff Member

    55,402
    12,255
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,835
    Local Time:
    8:26 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    FYI, for anyone reading this. in Centmin Mod 123.09beta01 and higher centmin.sh menu option 22 wordpress auto installer now defaults to using KeyCDN's Cacher Enabler plugin listed in this thread instead of WP Super Cache ;)
     
  3. ndha

    ndha Member

    83
    10
    8
    Sep 28, 2014
    Ratings:
    +29
    Local Time:
    5:26 AM
    1.27
    10.6
    @eva2000 i'm using option 22 for 2 sites with cache enabler in same vps.
    but when i check header for both, i see different X-Cache-Handler,
    1 is X-Cache-Handler: php and other X-Cache-Handler: wp
    from what i read in here : WordPress Cache Enabler Plugin - KeyCDN Support
    it said if X-Cache-Handler: wp being shown, Cache Enabler’s expiry function wont work,
    if X-Cache-Handler: php shown then Cache Enabler’s expiry function will work.

    so how do you think about it, what is the best between those X-Cache-Handler and what was default centmin header if using option 22 cache enabler??
    Thanks..
     
  4. eva2000

    eva2000 Administrator Staff Member

    55,402
    12,255
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,835
    Local Time:
    8:26 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    did you modify one or both wordpress site's domain vhost files or wpsecure_domainname.com.conf include files in anyway ?

    centmin.sh menu option 22 for centmin mod 123.09beta01 branch auto configures the advanced config snippet to bypass PHP outlined at WordPress Cache Enabler Plugin - KeyCDN Support It's set in /usr/local/nginx/conf/wpincludes/${vhostname}/wpcacheenabler_${vhostname}.conf include file for your nginx site vhost where ${vhostname} = yourdomain.com name

    with the location try_files portion in your domain nginx site vhost file

    for one reporting php instead of wp, try just disabling cache enabler plugin and re-enabling it and see what happens

    bit confusing but you'd want to have x-cache-handler: wp which indicates advanced config in use to bypass PHP or no header at all.
     
  5. raciasolvo

    raciasolvo Member

    98
    11
    8
    Oct 7, 2016
    Ratings:
    +28
    Local Time:
    1:26 AM
    Nginx 1.11.6
    MariaDB 10.0.27
    Hm... I tested site:
    1. Curl - no X-Cache-Handler
    2. Last Microsoft Edge - no X-Cache-Handler
    3. Chrome 53.0.2785.143 m (64-bit) incognito mode - X-Cache-Handler: wp
    Strange results.

     
  6. eva2000

    eva2000 Administrator Staff Member

    55,402
    12,255
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,835
    Local Time:
    8:26 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    looks good means it's working
     
  7. ndha

    ndha Member

    83
    10
    8
    Sep 28, 2014
    Ratings:
    +29
    Local Time:
    5:26 AM
    1.27
    10.6
    @eva2000 yeah after i re-enable again cache enabler plugin, both shows X-Cache-Handler: wp :)
    so default for centmin cache enabler option 22 is X-Cache-Handler: wp if everything is ok, right.
    but that mean Cache Enabler’s expiry function in plugin wont work, right??
    must setup cron job for do that??
     
  8. eva2000

    eva2000 Administrator Staff Member

    55,402
    12,255
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,835
    Local Time:
    8:26 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    ah yes missed that need a cronjob

    Modify the path to your wp-content/cache/cache-enabler directory and edit ${DELAY} with a 3 digit number i.e. 123 which means delay run by 123 seconds. This ensures no 2 cronjobs run into each other at the same time. And edit ${vhostname} with your domain.com name.
    Code (Text):
    16 23 * * * echo "$vhostname cacheenabler cron"; sleep ${DELAY}s ; rm -rf /home/nginx/domains/${vhostname}/public/wp-content/cache/cache-enabler/* > /dev/null 2>&1


    @JarylW might need this
     
    Last edited: Oct 10, 2016
  9. JarylW

    JarylW Active Member

    216
    41
    28
    Jun 19, 2014
    Singapore
    Ratings:
    +103
    Local Time:
    6:26 AM
    Cache enabler wipes entire cache when there is an update to the site so it is quite fine anyway. If site isn't updated then no need to wipe cache I suppose :3
     
  10. eva2000

    eva2000 Administrator Staff Member

    55,402
    12,255
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,835
    Local Time:
    8:26 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    update as in wordpress php file update ? or you mean post updates ?
     
  11. JarylW

    JarylW Active Member

    216
    41
    28
    Jun 19, 2014
    Singapore
    Ratings:
    +103
    Local Time:
    6:26 AM
    Post updates :)
     
  12. eva2000

    eva2000 Administrator Staff Member

    55,402
    12,255
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,835
    Local Time:
    8:26 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Oh i see :)
     
  13. serious96

    serious96 New Member

    6
    1
    3
    Oct 18, 2016
    Ratings:
    +2
    Local Time:
    5:26 AM
    1.11.5
    10.1
    The latest update already enable advanced configuration by default. From their page, they said if "X-Cache-Handler: wp" header is shown the advanced-cache.php file is used. Don't you think the nginx configuration are redundant by now?
     
  14. raciasolvo

    raciasolvo Member

    98
    11
    8
    Oct 7, 2016
    Ratings:
    +28
    Local Time:
    1:26 AM
    Nginx 1.11.6
    MariaDB 10.0.27
    I think you're right. "X-Cache-Handler: wp" says that php works. We can bypass the php if we need it or we can use php.
    I use nginx (I think nginx is faster) and do not use cron snippet.
    Code (Text):
    http {
    ...
    #map $http_accept $webp_suffix { "~*image/webp" "-webp"; }
    ...
    server {
    ...
    location / {
    ...
    #try_files      /path_to_wp/wp-content/cache/cache-enabler/your_domain_name/${request_uri}/index${webp_suffix}.html /index.php?$args;
    try_files       /path_to_wp/wp-content/cache/cache-enabler/your_domain_name/${request_uri}/index.html /index.php?$args;

    I can not test with WooCommerce and WPcomments. I do not use them.
     
    Last edited: Oct 25, 2016
  15. eva2000

    eva2000 Administrator Staff Member

    55,402
    12,255
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,835
    Local Time:
    8:26 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    where did they say that ? change log doesn't mention that Cache Enabler - WordPress Cache — WordPress Plugins

    nginx config rules is needed either way as there's way to do it from php only to bypass php cache.
     
  16. serious96

    serious96 New Member

    6
    1
    3
    Oct 18, 2016
    Ratings:
    +2
    Local Time:
    5:26 AM
    1.11.5
    10.1
  17. raciasolvo

    raciasolvo Member

    98
    11
    8
    Oct 7, 2016
    Ratings:
    +28
    Local Time:
    1:26 AM
    Nginx 1.11.6
    MariaDB 10.0.27
    I tested cacheenabler without nginx cacheenabler include. It works.
     
    Last edited: Oct 25, 2016
  18. eva2000

    eva2000 Administrator Staff Member

    55,402
    12,255
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,835
    Local Time:
    8:26 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Interesting will have to test this out to see if it bypasses php during load testing
     
  19. eva2000

    eva2000 Administrator Staff Member

    55,402
    12,255
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,835
    Local Time:
    8:26 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    just tested myself and it only works for home index page, post pages doesn't get cached for me without the include file and try_files that i setup.

    re-enable my include file and try_files and all pages/posts get cached including home index. So I'll stick with the existing include file setup and try_files for centmin.sh menu option 22 in 123.09beta01 :)
     
  20. emre22

    emre22 Member

    44
    5
    8
    Oct 15, 2016
    Ratings:
    +5
    Local Time:
    12:26 AM
    nginx-1.10.1
    MariaDB 10
    # 16 23 * * * echo "$vhostname cacheenabler cron"; sleep 123s ; rm -rf /home/nginx/domains/mydomain.net/public/wp-content/cache/cache-enabler/* > /dev/null 2>&1

    -bash: 16: command not found


    what happened wrong?