pantheon-systems / wp-redis

WordPress Object Cache using Redis.
https://wordpress.org/plugins/wp-redis/
GNU General Public License v2.0
226 stars 68 forks source link

Question: bypass "page caching" on cookie #276

Closed dingman closed 4 years ago

dingman commented 4 years ago

I'm looking at your plugin as an option to replace W3TC, since W3TC has seemed to be slowing down my site a bit.

I wrote a custom in-session tracking function which allows me to set a cookie when specific parameters are present, and persist those values across the session.

These values modify the_content within the page.

Is there a viable solution to use as much Redis caching as possible to provide a super fast experience, while modifying specific parts of the_content when that session/cookie is present?

danielbachhuber commented 4 years ago

Thanks for the question, @dingman

I'm looking at your plugin as an option to replace W3TC, since W3TC has seemed to be slowing down my site a bit.

It's worth noting that W3TC provides many caching functions (e.g. object cache, full page cache, etc.), while WP Redis only provides one caching function, object caching.

Here's a bit more detail on object caching. The WordPress at Scale website has a lot of content about caching generally.

These values modify the_content within the page.

Is there a viable solution to use as much Redis caching as possible to provide a super fast experience, while modifying specific parts of the_content when that session/cookie is present?

WordPress doesn't store the results of the_content in the object cache by default. Unless you're running some custom code that does this, it would be fine to use WP Redis with your session tracking functionality.

Hope this helps!