pantheon-systems / wp-redis

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

WP Redis Caching Whitelisted Query Strings #261

Closed dingman closed 4 years ago

dingman commented 4 years ago

Great plugin, thank you so much for building and maintaining it.

I have a query on query strings. (ha, see what I did there? )

Is there a way to add customization to whitelist specific query strings to be served from cache?

For example, domain.com/my-viral-post/ domain.com/my-viral-post/?utm_source=facebook

How would I get those to serve the same cache, since they're the same page?

And have domain.com/my-viral-post/?utm_source=facebook&var=1 to generate a new full page cache because of var=1

Likewise, is there a way to set the lifetime of a full page cache? I'm thinking most about A/B split testing and ensuring that traffic is effectively cached as I need it to be.

TIA!

danielbachhuber commented 4 years ago

Hey @dingman:

For example, domain.com/my-viral-post/ domain.com/my-viral-post/?utm_source=facebook How would I get those to serve the same cache, since they're the same page?

You might be confusing WP Redis with another caching plugin you're using.

WP Redis only handles object caching, not full page caching. WP Redis doesn't have any awareness of the page that it's invoked on.

dingman commented 4 years ago

Thanks for the clarification :)