deepak-rajpal
11/20/2015 - 2:48 PM

Change WordPress cache feed time from defalut 12 hours to 30 minutes

Change WordPress cache feed time from defalut 12 hours to 30 minutes

<?php
/* By default, WordPress cache feed or rather the cached feed has a lifetime of 43200 seconds, equivalent to 12 hours. */
/* Starts: Change the default feed cache recreation period to 1800 seconds/30 minutes */

function return_cache_recreation( $seconds )
{
  return 1800;
}
add_filter( 'wp_feed_cache_transient_lifetime' , 'return_cache_recreation' );
/* Ends: Change the default feed cache recreation period */
?>