Title: Smith Nandagawali's Replies | WordPress.org

---

# Smith Nandagawali

  [  ](https://wordpress.org/support/users/smithn67/)

 *   [Profile](https://wordpress.org/support/users/smithn67/)
 *   [Topics Started](https://wordpress.org/support/users/smithn67/topics/)
 *   [Replies Created](https://wordpress.org/support/users/smithn67/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/smithn67/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/smithn67/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/smithn67/engagements/)
 *   [Favorites](https://wordpress.org/support/users/smithn67/favorites/)

 Search replies:

## Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[W3 Total Cache] w3tc_pgcache_flush_post() function is not working](https://wordpress.org/support/topic/w3tc_pgcache_flush_post-function-is-not-working/)
 *  Thread Starter [Smith Nandagawali](https://wordpress.org/support/users/smithn67/)
 * (@smithn67)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/w3tc_pgcache_flush_post-function-is-not-working/#post-17049895)
 * Hi,
 * In my project we are using Redis cache which clears the cache after 4 hours, 
   in between if I update any CPT the content change will not reflect for 4 hours.
   Therefore I want to purge the specific custom post type cache after update.
 *     ```wp-block-code
       add_action( 'save_post', 'my_save_post_function', 10, 3 );
   
       function my_save_post_function( $post_ID, $post, $update ) {
   
         global $post_type;
   
         if( $post_type  == 'articles' ){
   
               if (w3tc_flush_post($post_id)){
   
                   echo __('<div class="updated"><p>Working</p></div>');
   
               }else{
   
                   echo __('<div class="error"><p>Not working</p></div>');
   
               }
   
           } else{
   
               echo __('<div class="error"><p>Out</p></div>');
   
           }
   
          $msg = 'Is this un update? ';
          $msg .= $update ? 'Yes.' : 'No.';
          wp_die( $msg );
   
       }
       ```
   
 * Using wp_die() I am checking the function is working or not.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[W3 Total Cache] w3tc_pgcache_flush_post() function is not working](https://wordpress.org/support/topic/w3tc_pgcache_flush_post-function-is-not-working/)
 *  Thread Starter [Smith Nandagawali](https://wordpress.org/support/users/smithn67/)
 * (@smithn67)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/w3tc_pgcache_flush_post-function-is-not-working/#post-17000811)
 * Hi, 
   Thanks for quick reply, I tried w3tc_flush_post( $post_id) it is still not
   working.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[TotalPoll for Polls and Contests] How to select multiple polls with dates](https://wordpress.org/support/topic/how-to-select-multiple-polls-with-dates/)
 *  Thread Starter [Smith Nandagawali](https://wordpress.org/support/users/smithn67/)
 * (@smithn67)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/how-to-select-multiple-polls-with-dates/#post-15448226)
 * Hi,
 * Ok, can you please tell me the custom field name using for end date, I will create
   a custom code for it.
 * Thanks
    -  This reply was modified 4 years, 3 months ago by [Smith Nandagawali](https://wordpress.org/support/users/smithn67/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[TotalPoll for Polls and Contests] How to select multiple polls with dates](https://wordpress.org/support/topic/how-to-select-multiple-polls-with-dates/)
 *  Thread Starter [Smith Nandagawali](https://wordpress.org/support/users/smithn67/)
 * (@smithn67)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/how-to-select-multiple-polls-with-dates/#post-15444608)
 * Hi,
 * I want to create multiple polls and according to the date wants to show it on
   a single page.
 * Example: if there are 10 polls 3 polls is expired so I can choose only those 
   polls which are not expired.
 * Thanks for the early reply

Viewing 4 replies - 1 through 4 (of 4 total)