def kippt_rss(request): from django.core.cache import cache from settings import API_KEY, API_SECRET, username, password_hash from kippt import kippt_wrapper k = kippt_wrapper.user("%s" % settings.KIPPT_API_USER, "%s" % settings.KIPPT_API_TOKEN) TIMEOUT = (3600 * 48 / 60) * 5 # ten days kippt_imps = cache.get("kippt_imps") if kippt_imps: return {"imp_feed": kippt_imps} kippt_imps = k.getClips(134737, 2) cache.set("kippt_imps", kippt_imps[1], TIMEOUT) return {"imp_feed": kippt_imps[1]}