? .buildpath
? .project
? .settings
? 236657-D6.patch
? 236657.patch
? filter_cache.patch
? sites/private
? sites/default/files
? sites/default/private
? sites/default/settings.php
Index: modules/filter/filter.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/filter/filter.admin.inc,v
retrieving revision 1.43
diff -u -p -r1.43 filter.admin.inc
--- modules/filter/filter.admin.inc	5 Sep 2009 13:22:13 -0000	1.43
+++ modules/filter/filter.admin.inc	6 Sep 2009 14:54:50 -0000
@@ -317,8 +317,8 @@ function filter_admin_configure_submit($
       ->execute();
   }
 
-  // Clear the filter's cache when configuration settings are saved.
-  cache_clear_all($format->format . ':', 'cache_filter', TRUE);
+  // Inform modules that the filter settings have been updated.
+  module_invoke_all('filter_format_update', $format->format);
 
   drupal_set_message(t('The configuration options have been saved.'));
 }
@@ -394,8 +394,8 @@ function filter_admin_order_submit($form
         'weight' => $weight,
       ))
       ->execute();
+    // Inform other modules that the filter has been updated.
+    module_invoke_all('filter_format_update', $form_state['values']['format']);
   }
   drupal_set_message(t('The filter ordering has been saved.'));
-
-  cache_clear_all($form_state['values']['format'] . ':', 'cache_filter', TRUE);
 }
Index: modules/filter/filter.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/filter/filter.install,v
retrieving revision 1.19
diff -u -p -r1.19 filter.install
--- modules/filter/filter.install	27 Aug 2009 21:18:19 -0000	1.19
+++ modules/filter/filter.install	6 Sep 2009 14:54:50 -0000
@@ -105,9 +105,6 @@ function filter_schema() {
     ),
   );
 
-  $schema['cache_filter'] = drupal_get_schema_unprocessed('system', 'cache');
-  $schema['cache_filter']['description'] = 'Cache table for the Filter module to store already filtered pieces of text, identified by text format and md5 hash of the text.';
-
   return $schema;
 }
 
@@ -260,3 +257,12 @@ function filter_update_7004() {
   return $ret;
 }
 
+/**
+ * Remove the filter cache.
+ */
+function filter_update_7005() {
+  $ret = array();
+  db_drop_table($ret, 'cache_filter');
+
+  return $ret;
+}
Index: modules/filter/filter.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/filter/filter.module,v
retrieving revision 1.287
diff -u -p -r1.287 filter.module
--- modules/filter/filter.module	30 Aug 2009 06:04:09 -0000	1.287
+++ modules/filter/filter.module	6 Sep 2009 14:54:50 -0000
@@ -211,8 +211,6 @@ function filter_format_save($format) {
     module_invoke_all('filter_format_update', $format);
   }
 
-  cache_clear_all($format->format . ':', 'cache_filter', TRUE);
-
   return $return;
 }
 
@@ -233,8 +231,6 @@ function filter_format_delete($format) {
   // Allow modules to react on text format deletion.
   $default = filter_format_load(variable_get('filter_default_format', 1));
   module_invoke_all('filter_format_delete', $format, $default);
-
-  cache_clear_all($format->format . ':', 'cache_filter', TRUE);
 }
 
 /**
@@ -257,15 +253,6 @@ function filter_permission() {
 }
 
 /**
- * Implement hook_cron().
- *
- * Expire outdated filter cache entries
- */
-function filter_cron() {
-  cache_clear_all(NULL, 'cache_filter');
-}
-
-/**
  * @name Tips callbacks for filters.
  * @{
  * Filters implemented by the filter.module.
@@ -547,15 +534,9 @@ function filter_list_format($format) {
  *   The caller may set this to FALSE when the output is already cached
  *   elsewhere to avoid duplicate cache lookups and storage.
  */
-function check_markup($text, $format = FILTER_FORMAT_DEFAULT, $langcode = '', $cache = TRUE) {
+function check_markup($text, $format = FILTER_FORMAT_DEFAULT, $langcode = '') {
   $format = filter_resolve_format($format);
 
-  // Check for a cached version of this piece of text.
-  $cache_id = $format . ':' . $langcode . ':' . md5($text);
-  if ($cache && $cached = cache_get($cache_id, 'cache_filter')) {
-    return $cached->data;
-  }
-
   // Convert all Windows and Mac newlines to a single newline, so filters only
   // need to deal with one possibility.
   $text = str_replace(array("\r\n", "\r"), "\n", $text);
@@ -567,22 +548,17 @@ function check_markup($text, $format = F
   // Give filters the chance to escape HTML-like data such as code or formulas.
   foreach ($filters as $name => $filter) {
     if (isset($filter_info[$name]['prepare callback']) && function_exists($filter_info[$name]['prepare callback'])) {
-      $text = $filter_info[$name]['prepare callback']($text, $filter, $format, $langcode, $cache, $cache_id);
+      $text = $filter_info[$name]['prepare callback']($text, $filter, $format, $langcode);
     }
   }
 
   // Perform filtering.
   foreach ($filters as $name => $filter) {
     if (isset($filter_info[$name]['process callback']) && function_exists($filter_info[$name]['process callback'])) {
-      $text = $filter_info[$name]['process callback']($text, $filter, $format, $langcode, $cache, $cache_id);
+      $text = $filter_info[$name]['process callback']($text, $filter, $format, $langcode);
     }
   }
 
-  // Store in cache with a minimum expiration time of 1 day.
-  if ($cache && filter_format_allowcache($format)) {
-    cache_set($cache_id, $text, 'cache_filter', REQUEST_TIME + (60 * 60 * 24));
-  }
-
   return $text;
 }
 
@@ -1005,8 +981,8 @@ function _filter_html_escape($text) {
 
 /**
  * Implement hook_user_role_delete().
- * 
- * Remove deleted role from formats that use it. 
+ *
+ * Remove deleted role from formats that use it.
  */
 function filter_user_role_delete($role) {
   db_update('filter_format')
