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

Missing "clear cache" link in admin bar (Pro version) on Multisite for nonadmin users #81

Closed
Neal81 opened this issue Mar 26, 2014 · 4 comments

Comments

@Neal81
Copy link

Neal81 commented Mar 26, 2014

Hi,
I'm upgrading to Pro version today.

My first problem is, that I'm missing "clear cache" link in admin bar (only for "nonadmin" logged users (editors). I have latest WP (3.8.1) and Multiste.. It's allright or?

I noticed, that when I create a new post - new feature of the Pro version is, that this post isn't cached - right? I see a new post on the web (one sidebar or on homepage, where i have a custom query) - that's ok - but when i'm on category page.. this new post is missing - post type "category" is cached.. BUG?

Thanx for answers..

@Neal81 Neal81 changed the title Missing "clear cache" link in admin bar in Pro version on Multisite for nonadmin users Missing "clear cache" link in admin bar (Pro version) on Multisite for nonadmin users Mar 26, 2014
@raamdev
Copy link
Contributor

raamdev commented Mar 26, 2014

Hello,

My first problem is, that I'm missing "clear cache" link in admin bar (only for "nonadmin" logged users (editors). I have latest WP (3.8.1) and Multiste.. It's allright or?

That is expected behavior. Non-Administrator accounts do not have permission to clear the cache, so the Clear Cache button doesn't show up. Only Administrators can clear the cache.

I noticed, that when I create a new post - new feature of the Pro version is, that this post isn't cached - right?

No, that's not correct. New posts are cached. However, if you're logged into WordPress, you won't see the cached version of the post because by default caching is disabled for logged-in users.

I see a new post on the web (one sidebar or on homepage, where i have a custom query) - that's ok - but when i'm on category page.. this new post is missing - post type "category" is cached.. BUG?

That's because the category page is being cached. When a new post is published, only the Home Page and the Posts Page caches are cleared, not the category cache.

There is a feature request open (#57) for clearing the category/tag page caches when a new post is published. That's on my TODO list and should resolve the issue you're seeing there. In the meantime, please take a look at my comment in #57 for my recommendations.

@Neal81
Copy link
Author

Neal81 commented Mar 26, 2014

Hello,

thank you for your reaply..

I saw in the forum, that you have in TODO list a feature, where nonadmin users like Editors have permission to clear cache, that would be good, because 99% users on my multisite are "editors", they have not be admin user .. so I have a big problem with this cache plugin to work a website fine..

If a wrote, that i see a new created post on website, i'm in a new browser, where i'm not logged..

I looked at #57 feature request - it's good to see, there is a chance exclude category from being cached - but my multisite have a lot of posts and categories and only about 4-5 static pages. So if i exclude category from cache - i mean this plugin lost a sence.. :/ i'm right?

@raamdev
Copy link
Contributor

raamdev commented Mar 26, 2014

So if i exclude category from cache - i mean this plugin lost a sence.. :/ i'm right?

Yes, that's true. You'll lose out on the caching of your category pages.

The other option is to write a MU-Plugin that clears the cache dynamically when someone posts a new post. However, if you only want to clear the cache for the category pages, then you'll need to write some code to reverse-engineer the cache filename so you know which cache file to delete. All of the source code is provided, so a knowledgeable PHP programmer shouldn't have too much trouble doing that.

Otherwise, I recommend waiting until #57 is finished.

@Neal81
Copy link
Author

Neal81 commented Mar 26, 2014

Thank you for your suggestion to dynamicaly clear the cache - a used this "action" in my functions.php and works great - i mean, that this feature substitute me the "clear cache" link on admin bar..

A last question - when someone posts a new post/page, a hope the cache is cleared only for particular web and post/page in multisite (i used the same code above) - i'm right?

@raamdev raamdev closed this as completed Mar 27, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants