@@ -472,7 +463,7 @@
-  cache_set(AFFILIATE_TOP_USERS_PAGE, 'cache', $output);
+  cache_set(AFFILIATE_TOP_USERS_PAGE, $output);
 }
 
 function _get_top_users_block($type = 'total') {
   $field = 'total_points';
   if ($type  == 'period') {
     $field = 'period_points';
@@ -499,13 +490,13 @@
   if (!$rows) {
     $rows[] = array(array('data' => t('No clicks yet'), 'colspan' => '3'));
   }
 
   $output = theme('table', array(), $rows);
 
-  cache_set(AFFILIATE_TOP_USERS_BLOCK . $type, 'cache', $output);
+  cache_set(AFFILIATE_TOP_USERS_BLOCK . $type, $output);
 }
 
 function _create_summary_data($limit = 5) {
 
   $period = time() - variable_get(AFFILIATE_PERIOD_INTERVAL, 86400);
 
@@ -646,7 +637,7 @@
       $uid, $cookie_value, $_SERVER['REMOTE_ADDR'], filter_xss($_SERVER['HTTP_REFERER']), $ad_id, time());
   }
 
   $redirect = db_result(db_query("SELECT redirect FROM {affiliates_ads} WHERE ad_id = %d", $ad_id));
 
   // Record it in the userpoints
-  if (module_exists('userpoints')) {
+  if (module_exist('userpoints')) {
