--- mailchimp/mailchimp.module 2008-12-23 19:12:55.000000000 -0500 +++ mailchimp.new/mailchimp.module 2009-09-16 20:03:44.000000000 -0400 @@ -120,7 +120,15 @@ $account = new stdClass(); $account->roles = array( 2 => "authenticated user" ); - $lists = _mailchimp_get_available_lists( $account, $q ); + $cache = cache_get('mailchimp_lists'); + if ($cache){ + $lists = unserialize($cache->data); + } + else { + $lists = _mailchimp_get_available_lists( $account, $q ); + cache_set('mailchimp_lists', 'cache', serialize($lists), time()+60*60); + } + if(!empty($lists)){ foreach ($lists as $list) { if ( variable_get( 'mailchimp_list_'. $list['id'] .'_listtype', '' ) !== 'required' ) { @@ -784,4 +792,4 @@ return NULL; } return $q; -} \ No newline at end of file +}