Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot view cacheflag in Control panel - production #17

Closed
CreateSean opened this issue Jul 29, 2022 · 5 comments
Closed

Cannot view cacheflag in Control panel - production #17

CreateSean opened this issue Jul 29, 2022 · 5 comments

Comments

@CreateSean
Copy link

I can view the cacheflag cp page locally however on production the cacheflag cp page is missing. This is for superadmins and regular users who have permissions set to view the cacheflag cp page.

Please advise.

Craft 3.7.37
Cacheflag 1.3.1

@mmikkel
Copy link
Owner

mmikkel commented Jul 29, 2022

I assume you have the allowAdminChanges config setting set to false in production?

Since the cache flags are synced using the project config, Cache Flag's CP section is only available in environments where admin changes are allowed.

If you need to clear any flagged caches in production, that's doable either via the native clear caches utility, or via the php craft invalidate-tags/cacheflag CLI command (more info here)

@CreateSean
Copy link
Author

thank you.

Is there anyway to have the option to clear caches in the control panel with allowadminchanges set to false. Client wants to be able to do this on their own.

@mmikkel
Copy link
Owner

mmikkel commented Aug 2, 2022

Yes, via the native Clear Caches utility:

CleanShot 2022-08-02 at 21 08 45@2x

Shameless plug: the CP Clear Cache plugin provides quicker/easier access to the clear caches utility.

I realise that giving clients full access to the clear caches utility might not be ideal in all circumstances, but it's the best I can do for right now. Marking this issue as a feature request though :)

@CreateSean
Copy link
Author

thank you. I didn't see that

@mmikkel
Copy link
Owner

mmikkel commented Jul 4, 2023

Resolved in Cache Flag 1.4.0 🎉

Cache Flag's CP section is now available in all environments. In environments where admin changes are disallowed, saving/changing flags isn't possible, but invalidating them is.

@mmikkel mmikkel closed this as completed Jul 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants