You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've noticed that this plugin does not seem to clear the cache for page when the page for example change status from publish to draft. Also probably the same bug applies to a page the slug is changed, or when page is trashed.
I've tried this on two wordpress installations on different servers and the same problem occurs on both. I don't think I have and plugins installed that would interfere with the plugin..
Plugin caching method is "nginx Fastchi cache" and purge method is "Delete local server cache files".
To test:
create a page with slug "cache-test"
Save page and visit in a new private browser window /cache-test/ to see that the page is working and is cached.
Make a small change in the post title and update the post. Refresh the page in the private browser window and notice that the title is correctly changed, i.e. the page has been cleared from the cache.
Now change the page status from publish to draft and save the page. Refresh the page in the private browser window and the page is still there. It has not been cleared from the cache.
Reason for error:
When the cache is cleared it uses the page permalink. So in the first case it cleares the cache for page http://localhost/cache-test/ but in the second cache is tried to clear the cache for page http://localhost/?page_id=5 that has never been cached at all. And the reason for this is that get_permalink() does not return pretty permalinks for draft posts, it simply returns $permalink = home_url('?p=' . $post->ID);
Excerpt from the nginx helper log:
Purge post on transition post STATUS from publish to publish
Purging page ( id 5, blog id 1 )
- Purging URL | http://localhost/cache-test/
delete_cache_file_for: http://localhost/cache-test/
Purge post on transition post STATUS from publish to draft
- Purging URL | http://localhost/?page_id=5
delete_cache_file_for: http://localhost/?page_id=5
- - http://localhost/?page_id=5 is currently not cached ( checked for file: /var/run/nginx-cache/8/5e/fd315ecc4dc2e2315f09f1cb6efc85e8 )
The text was updated successfully, but these errors were encountered:
I've noticed that this plugin does not seem to clear the cache for page when the page for example change status from publish to draft. Also probably the same bug applies to a page the slug is changed, or when page is trashed.
I've tried this on two wordpress installations on different servers and the same problem occurs on both. I don't think I have and plugins installed that would interfere with the plugin..
Plugin caching method is "nginx Fastchi cache" and purge method is "Delete local server cache files".
To test:
"cache-test"
/cache-test/
to see that the page is working and is cached.Reason for error:
When the cache is cleared it uses the page permalink. So in the first case it cleares the cache for page
http://localhost/cache-test/
but in the second cache is tried to clear the cache for pagehttp://localhost/?page_id=5
that has never been cached at all. And the reason for this is thatget_permalink()
does not return pretty permalinks for draft posts, it simply returns$permalink = home_url('?p=' . $post->ID);
Excerpt from the nginx helper log:
The text was updated successfully, but these errors were encountered: