diff --git a/modules/filter/filter.module b/modules/filter/filter.module index 27ae02cf3f684b2ceb0e8c34d275f681d45424af..9e1481207cdcdee02bd04fb43df9accb1712085e 100644 --- a/modules/filter/filter.module +++ b/modules/filter/filter.module @@ -760,9 +760,12 @@ function check_markup($text, $format_id = NULL, $langcode = '', $cache = FALSE) } } - // Store in cache with a minimum expiration time of 1 day. + // Cache the filtered text. This cache is infinitely valid. It becomes + // obsolete when $text changes (which leads to a new $cache_id). It is + // automatically flushed when the text format is updated. + // @see filter_format_save() if ($cache) { - cache_set($cache_id, $text, 'cache_filter', REQUEST_TIME + (60 * 60 * 24)); + cache_set($cache_id, $text, 'cache_filter'); } return $text;