Welcome to Centmin Mod Community
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

    497
    96
    28
    Nov 22, 2014
    Virginia, USA
    Ratings:
    +143
    Local Time:
    6:19 AM
    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

    47,284
    10,693
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,617
    Local Time:
    8:19 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    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

    82
    10
    8
    Sep 28, 2014
    Ratings:
    +29
    Local Time:
    5:19 PM
    Latest
    10
    @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

    47,284
    10,693
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,617
    Local Time:
    8:19 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    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
    10
    8
    Oct 7, 2016
    Ratings:
    +27
    Local Time:
    1:19 PM
    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

    47,284
    10,693
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,617
    Local Time:
    8:19 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    looks good means it's working
     
  7. ndha

    ndha Member

    82
    10
    8
    Sep 28, 2014
    Ratings:
    +29
    Local Time:
    5:19 PM
    Latest
    10
    @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

    47,284
    10,693
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,617
    Local Time:
    8:19 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    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:19 PM
    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

    47,284
    10,693
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,617
    Local Time:
    8:19 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    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:19 PM
    Post updates :)
     
  12. eva2000

    eva2000 Administrator Staff Member

    47,284
    10,693
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,617
    Local Time:
    8:19 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    Oh i see :)
     
  13. serious96

    serious96 New Member

    6
    1
    3
    Oct 18, 2016
    Ratings:
    +2
    Local Time:
    5:19 PM
    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
    10
    8
    Oct 7, 2016
    Ratings:
    +27
    Local Time:
    1:19 PM
    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

    47,284
    10,693
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,617
    Local Time:
    8:19 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    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:19 PM
    1.11.5
    10.1
  17. raciasolvo

    raciasolvo Member

    98
    10
    8
    Oct 7, 2016
    Ratings:
    +27
    Local Time:
    1:19 PM
    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

    47,284
    10,693
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,617
    Local Time:
    8:19 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    Interesting will have to test this out to see if it bypasses php during load testing
     
  19. eva2000

    eva2000 Administrator Staff Member

    47,284
    10,693
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,617
    Local Time:
    8:19 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    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:19 PM
    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?