wp-media / wp-rocket

Performance optimization plugin for WordPress
https://wp-rocket.me
GNU General Public License v2.0
701 stars 220 forks source link

Include addon "No Cache for Admin" inside the plugin #2056

Closed gevcen closed 5 years ago

gevcen commented 5 years ago

Is your feature request related to a problem? Please describe. No cache for admin is a separate addon instead of a core feature.

Describe the solution you'd like This addon should really added inside the plugin. The main reason why it should is because, if we keep it a separate addons, it means that it will never gonna be part of the regular testing activities on every release. Therefore, it would never be tested with all the deployments you do and could lead to bugs that wouldn't be seen.

Describe alternatives you've considered Alternative would be to make sure that all addons available in your documentation are always part of your testing activites on every single release.

Additional context https://github.com/wp-media/wp-rocket/issues/616

arunbasillal commented 5 years ago

Hello @gevcen

Thanks for opening the issue. Is this just a theory or did you spot any bugs with the current implementation?

The reasons why we don't have this in the UI is explained here - https://github.com/wp-media/wp-rocket/issues/616#issuecomment-349002723

gevcen commented 5 years ago

Hello @arunbasillal

I did not spot any actual bug with the current implementation. However, I consider the explanations given regarding the UI not sufficient. Any user who considers working on the optimization of a site needs to have a minimum amount of understanding about the features of the tool used to perform the optimization. Integrating those addons as part of the default features can only benefit to everyone as we would not need to look around for getting this feature. In addition, it's an absolutely crucial feature to avoid any problem to admins if we enable the default feature of "create cache for logged in users"

If you don't agree on the above, I'd reply that you did implement some addons integrated into the application for Clouflare, Facebook ... so why not applying your same reason on this? Addons should always be available in the tool.

Thanks a lot

arunbasillal commented 5 years ago

Thanks for the continued feedback. Would you provide feedback on why admins shouldn't have the cached version to begin with? WP Rocket keeps caches in sync at every turn when content is updated for everyone.

I am wondering if caching is causing problems for admins, wouldn't it cause issues for other logged in users too? Isn't it better for admins to not be excluded so that these issues (if any) are caught right when they happen?

Cloudflare, Facebook and other add-ons would be too complicated to be simple helper plugins. They come with their own UI and a lot of code as compared to single page helper plugins.

gevcen commented 5 years ago

Admins should never face any cached version of their site content for the simple reason that any changes made on the site should be immediately visible to the admin. Caching is generated only for the purpose of having users naviguating faster on website. If admins face a cached version of their site, they'll never properly see any changes made to their site content. That's why for example in Cloudflare, we always add page rules to avoid caching wp-content pages.

arunbasillal commented 5 years ago

WP Rocket keeps the cache updated not just for admins, but for everyone at every turn. For example, when you update a post or a page, the cache is purged for everyone and recreated immediately.

And in scenarios where the version is not in sync (example CSS file manually updated), Admins seeing the issue right away will help resolve it (by clearing the cache manually) rather than waiting for a non-Admin user to report it. I think this is where most users would fit.

In your case, it sounds like a preference. And for that, we have the simple helper plugin.

I will leave this issue open for now to solicit other opinions from other users, if any.

arunbasillal commented 5 years ago

Closing this because this is not something we will proceed right now. Whenever we see issues with caching for admins, we add compatibility. If that doesn't work, we already have the helper plugin. Everyone wins.