--- beautify.module	Sun Feb  1 04:15:18 2009
+++ beautify.module	Sun Jun  7 18:59:53 2009
@@ -321,8 +321,9 @@
       $output = beautify_htmltidy_process($input);
       break;
   }
-
-  beautify_set_cache($output);
+  if (variable_get('cache', CACHE_DISABLED) != CACHE_DISABLED) {
+    beautify_set_cache($output);
+  }
   print $output;
 }
 
