Hi,
I create a CRED form that allow to add a new custom post type (name, video, description). I also created a view that display all post, but I have a problem (I think is a cache problem). After created a new post, in the view the new post is not shown (I have this problem in iOS/android not in PC). It was show after 10 min. I tried to add the attribute cached="off" to the view, and resolve the issue only on iOS. How can i fix the problem also on android devices?
I use wp-engine for my wordpress site, and if I clear all cache, the new post was show on Android.
There is a way to clear all cache programmatically? If yes, i can be able to clear cache inside CRED hook.
AleixS
Hi, the "cached" attribute for a View doesn't have anything to do with WPEngine's cache. They are not related, so changing the "cached" attribute on a View will not force WPEngine's cache to update or not. WPEngine uses a particularly aggressive object cache system that can cause problems like this. You can choose to disable it in your WP Engine settings, or you can try to flush the cache programmatically. Try adding the following code in your CRED API hook:
if ( wp_using_ext_object_cache() ) {
wp_cache_flush();
return;
}