Changing cache lifetime for wp_feed_cache (2 posts)

  1. MultiformeIngegno
    Posted 4 years ago #

    Hi guys, this is the code I'm using to extract info from an external feed:

    [Code moderated as per the Forum Rules. The maximum number of lines of code that you can post in these forums is ten lines. Please use the pastebin]

    I'd like to change the caching lifetime (I think that default is set to 10 hours).. do I need to put this in functions.php or I can also add it right after the <?php tag..?

    add_filter('wp_feed_cache_transient_lifetime', create_function('$a', 'return 300;'));

    Thanks in advance! :)

  2. MultiformeIngegno
    Posted 4 years ago #


Topic Closed

This topic has been closed to new replies.

About this Topic