Would advanced cache configurations have any option to just offload guest caching logic to the web server itself ?
For example, when guest caching is enabled add a special cookie to distinctly detect guest vs logged in and/or maybe even tag specific routes with specific cookies which we can programatically configure at web server level to include or exclude from caching ?
i.e. for nginx PHP-FPM fastcgi_cache
https://xenforo.com/community/resou...x-fastcgi_cache-full-page-guest-caching.5393/ and similarly for Nginx proxy_cache you can set cache to include or exclude requests based on detected cookies.
The same can be done for other cache accelerators like Varnish Cache and
LiteSpeed Cache Addon for utilising a special cookie(s) to determine what can/cannot be cached. So such an optional advanced option would be useful for folks wanting XF 2.1 to offload full page guest caching from PHP to the upstream web server or web accelerator itself
Such a cookie(s) feature would also work with Cloudflare Business level plans and higher for bypass cache on cookie page rules outlined at
https://blog.cloudflare.com/caching-anonymous-page-views/ so you can offload full page guest caching to Cloudflare too! So larger Xenforo clients who don't want to mess with web server level cache configurations can just use Cloudflare Business level plans to configure page rules for bypass cache on cookie settings and enable XF 2.1 advanced cache cookie(s) route setups. Cloudflare Enterprise plans can even go one better with Cloudflare Custom Cache Keys to cache on cookie detection.
By adding advanced XF 2.1 full page guest caching routes by cookie(s) you will single handily allow alot of upstream PHP offloading methods for much better performance via
- Nginx proxy_cache
- Nginx + PHP-FPM Fastcgi_cache
- Varnish Cache
- LiteSpeed Cache
- Cloudflare Business and higher plan guest caching
I ask as XF 2.1 guest cache seems to still require requests to pass through PHP itself and that reduces the efficiency and performance of full page guest caching - I've seen it first hand with other web apps (wordpress/magento) that implement full page guest caching through PHP having only slightly better performance than without full page guest cache as opposed to when compared to doing full page guest caching where load is moved from PHP to the web server or web accelerator.