Does EasyEngine --wpredis add both NGINX HTTP Cache and Redis Full Page Cache?

You need to tell them about object cache and database cache rather than redis easy for them to undersatnd

The most common use for the object cache is caching the results of expensive SQL queries so they’re not performed multiple times within a page load. In the below example, imagine the $query variable is an expensive SQL query.

https://codex.wordpress.org/Class_Reference/WP_Object_Cache

1 Like

Can I say it is a NGINX HTTP cache for Page Caching?

I would like to be able to say it is multilayered caching with HTTP and Object Caching in Memory.

Say, it is multilayered caching. Utilizing Nginx fast CGI Caching (static page cache) with Redis or memcache for object cache for faster page generation for non logged in and logged in user

Although ee install memcache with nginx fast cgi cache

Sorry but that is not true. EE installs Redis with NGINX integration with the option --wpredis.

Im talking about when you install fastcgi cache --wpfc --php7 it install memcache and i tried this --wpfc --php7 --wpredis and it didnt install wordpress I forgot the error

and i think --wpredis doesnt use fast cgi cache

When you create a site with --wpredis you get full page caching + object cache.

You must configure Redis plugin accordingly, and enable Redis object cache. I use the following code (run as root) to achieve this easily:

rm wp-content/cache/* -rfv
rm wp-content/advanced-cache.php
rm wp-content/object-cache.php
wp core update
wp core update-db
wp plugin activate nginx-helper
wp plugin activate redis-cache
wp plugin update --all
wp option update rt_wp_nginx_helper_options '{"log_level":"INFO","log_filesize":5,"enable_purge":1,"enable_map":0,"enable_log":0,"enable_stamp":0,"purge_homepage_on_new":1,"purge_homepage_on_edit":1,"purge_homepage_on_del":1,"purge_archive_on_new":1,"purge_archive_on_edit":1,"purge_archive_on_del":1,"purge_archive_on_new_comment":1,"purge_archive_on_deleted_comment":0,"purge_page_on_mod":1,"purge_page_on_new_comment":1,"purge_page_on_deleted_comment":1,"cache_method":"enable_redis","purge_method":"get_request","redis_hostname":"127.0.0.1","redis_port":"6379","redis_prefix":"nginx-cache:"}' --format=json
wp redis enable

This is a snippet from a script, so be aware this is not intended to be an universal solution for all cases.

But I think you don’t need the disclaimers. :slight_smile:

1 Like

I thought EE configures the plugins for me or rather that they work out of the box. That you just have to enable the object caching plugin and thats it?!

Got it They do page caching via a dropin which similar to any plugin and they install a plugin for obejct cache which is the job of redis Calling it redis full page cache doesn’t make much sense

You don’t make sense, young man.

REDIS Cache, in EasyEngine context, always was used for page caching. The object cache is achieved by using a dropin.

You still have to configure how and when the caches will be autoexpired in Nginx Helper options. I already gave you the code to do this without even entering WP Dashboard.

2 Likes

Ok what code you talking about

Carefully read this thread again from begin to end, instead of asking annoying questions, please.

2 Likes

you mean page caching doen by redis on nginx level like fast cgi cache??

Yes.

1 Like

Thanks a lot for the code. I dont mind doing it manually though (for now).

In all my years of wordpress I have never used the wp CLI (I have used plenty of other CLI programs). How do I specify the page I want to edit with the wp command?

@portofacil So if I say: Multilayer Pagecaching by Redis and NGINX it would not be correct as nginx does not do any part of the page caching? I am asking for marketing reasons but I will never state anything untruthful!

Thanks!

The “REDIS-Cache” plugin creates page cache entries in REDIS; Nginx consumes these entries from REDIS, serving them directly as any other cache.

In order to run WP-CLI commands on a blog, just cd its root directory. Example:

cd /var/www/example.com/htdocs
wp user list
1 Like

Thanks!

I will investigate how to do it with absolute commands without having to go to the folder.

Just use :

wp user list --path=`path/to/wordpress'
1 Like