import cronjobs
import feedparser
from django.conf import settings
from django.core.cache import cache

@cronjobs.register
def update_feeds():
    for name, url in settings.FEEDS.items():
        feed_info = feedparser.parse(url)
        cache.set('feeds-%s' % name, feed_info)

import cronjobs
import feedparser
from django.conf import settings
from django.core.cache import cache

@cronjobs.register
def update_feeds():
    for name, url in settings.FEEDS.items():
        feed_info = feedparser.parse(url)
        # Cache for a year (it will be set by the cron job no matter
        # what on a set interval)
        cache.set('feeds-%s' % name, feed_info, 60*60*24*365)

make feeds cache for a year since the cronjob has its own interval