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


#1

Does EasyEngine --wpredis add both NGINX HTTP Cache and Redis Full Page Cache? How does it work?


#2

if you trying to install wpfc and wpredis then it didnt work if you install wpfc than instead of redis it install memcache if you only using redis then it didnt install wpfc


#3

Sorry @vibhi but your answer does not answer my question.

I would like to know if nginx still does http caching with --wpredis?


#4

By http caching if you mean fast cgi cache then i think it doesnt do that


#5

Does anybody have a simple explanation of the --wpredis Caching and how to describe it in a short way that also customers would understand?


#6

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


#7

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.


#8

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


#9

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


#10

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


#11

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:


#12

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?!


#13

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


#14

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.


#15

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.


#16

Ok what code you talking about


#17

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


#18

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


#19

Yes.


#20

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?