• Hello.
    The plugin has troubles when a external object-cache is used.

    WordPress core is pushing more and more for users to use an external object cache.

    In our case, in order to solve it, we had to create some custom functionality in order to clear the caches.
    But the logic might as well be part of the plugin

    class NestedPagesCache {
    
    	public function __construct() {
    		add_action( 'nestedpages_posts_order_updated', [ $this, 'clear_cache_on_nestedpages_posts_order_updated' ], 10, 2 );
    	}
    
    	public function clear_cache_on_nestedpages_posts_order_updated( $posts, $parent ) {
    		$posts_objs = array_map( [ $this, 'get_post' ], $posts );
    		// update_post_caches( $posts_objs, 'page', false, true );
    	}
    
    	public function get_post( $posts_sub_array ) {
    		// return \get_post( $posts_sub_array['id'] );
    		return \clean_post_cache( $posts_sub_array['id'] );
    	}
    
    }
    
    new NestedPagesCache();
    
  • The topic ‘Doesnt play well, when using object-cache’ is closed to new replies.