Hi, I am looking into the option of generating page-cache for individual users/ per user.
I am aware that with user count this will scale badly, but I am into the possibility of such thing nevertheless.
Quick summary of what my system consists of:
I am using WooCommerce. As it is a login-locked platform and only logged users can access the store – there are price rules, based on users.
With page-caching as it is – if an user X views product Y with price of Z, then the next user (A) will view the same product with user X’s price, instead of his own pricing (B) .
What I aim to accomplish with user-centered page-caching is so that product Y is cached twice. Once with price Z for user X, and once with price B, for user A.
How I believe this can be done – when a cache set is created, it receives an identifier. I believe the identifier can be modified via a filter hook (perhaps ‘pagecache_page_key’). To this identifier I would append the user ID, this would happen once when checking for cache hit (then setting the identifier) and once when grabbing it.
Later on I can implement group caching rules based on user meta or something else, in order to avoid creating a set for every single user, but until then I need to know how would such caching be possible, if at all.
I am seeking technical guidance as I cannot find documentation related to the topic.
Thanks in advance!