Index: modules/filter/filter.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/filter/filter.module,v
retrieving revision 1.248
diff -u -p -r1.248 filter.module
--- modules/filter/filter.module	25 Apr 2009 18:01:10 -0000	1.248
+++ modules/filter/filter.module	29 Apr 2009 21:39:18 -0000
@@ -452,9 +452,10 @@ function check_markup($text, $format = F
       $text = module_invoke($filter->module, 'filter', 'process', $filter->delta, $format, $text, $langcode, $cache_id);
     }
 
-    // Store in cache with a minimum expiration time of 1 day.
-    if (filter_format_allowcache($format)) {
-      cache_set($cache_id, $text, 'cache_filter', REQUEST_TIME + (60 * 60 * 24));
+    // Store in cache using the system's expiration time or the default of 
+    // 1 day, if it is not set.
+    if ($cache) {
+      cache_set($cache_id, $text, 'cache_filter', REQUEST_TIME + variable_get('cache_lifetime', 60 * 60 * 24));
     }
   }
   else {
