Title: Changing cache lifetime for wp_feed_cache
Last modified: August 20, 2016

---

# Changing cache lifetime for wp_feed_cache

 *  [multiformeingegno](https://wordpress.org/support/users/lorenzone92/)
 * (@lorenzone92)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/changing-cache-lifetime-for-wp_feed_cache/)
 * Hi guys, this is the code I’m using to extract info from an external feed:
 * _[Code moderated as per the [Forum Rules](http://codex.wordpress.org/Forum_Welcome#Posting_Code).
   The maximum number of lines of code that you can post in these forums is **ten
   lines**. Please use the [pastebin](http://wordpress.pastebin.com/)]_
 * 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! 🙂

Viewing 1 replies (of 1 total)

 *  Thread Starter [multiformeingegno](https://wordpress.org/support/users/lorenzone92/)
 * (@lorenzone92)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/changing-cache-lifetime-for-wp_feed_cache/#post-2711091)
 * Hey..?

Viewing 1 replies (of 1 total)

The topic ‘Changing cache lifetime for wp_feed_cache’ is closed to new replies.

## Tags

 * [fetch_feed](https://wordpress.org/support/topic-tag/fetch_feed/)
 * [RSS](https://wordpress.org/support/topic-tag/rss/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [multiformeingegno](https://wordpress.org/support/users/lorenzone92/)
 * Last activity: [14 years, 1 month ago](https://wordpress.org/support/topic/changing-cache-lifetime-for-wp_feed_cache/#post-2711091)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
