diff options
author | Dries Buytaert <dries@buytaert.net> | 2011-08-12 09:36:26 -0400 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2011-08-12 09:36:26 -0400 |
commit | b434559af59c78d0f7007fad5431ce19abde76d4 (patch) | |
tree | dc3479cba6f4942a917b69f47840edde69380afd | |
parent | d20a9ee9641cf84fca822ff209b6b89b0f5a48a7 (diff) | |
download | brdo-b434559af59c78d0f7007fad5431ce19abde76d4.tar.gz brdo-b434559af59c78d0f7007fad5431ce19abde76d4.tar.bz2 |
- Patch #198855 by dereine, ainigma32, sun: check_markup() hardcodes cache expiration.
-rw-r--r-- | modules/filter/filter.module | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/modules/filter/filter.module b/modules/filter/filter.module index 27ae02cf3..9e1481207 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; |