diff -u media.filter.inc media.filter.inc --- media.filter.inc 21 Jan 2011 02:42:39 -0000 +++ media.filter.inc 21 Jan 2011 02:42:39 -0000 @@ -385,9 +385,9 @@ * * The approach currently used by the Media module is to record the fid of all * media entities that are referenced by any cached filter record, and flush the - * entire filter cache when one of these entities is updated, but not flush the - * cache when a media entity not referenced by any filter cache record is - * updated. + * entire filter cache when one of these entities is updated. When a media + * entity is not referenced by any filter cache record, updates to that entity + * will not trigger a cache flush. * * @param $fid * The media fid. @@ -430,7 +430,7 @@ */ function media_filter_usage_prune() { // @todo What if the field or filter caches hold on to an entry for more than - // 3 months (4 months - the update frequency in media_filter_usage_update())? + // 3 months (4 months - the update frequency in media_filter_usage_update())? db_delete('media_filter_usage')->condition('timestamp', REQUEST_TIME - 86400 * 120, '<')->execute(); } @@ -447,5 +447,5 @@ } else { - return (bool) db_query_range('SELECT 1 FROM {media_filter_usage} WHERE fid > :fid', 0, 1, array(':fid' => 0))->fetchField(); + return (bool) db_query_range('SELECT 1 FROM {media_filter_usage} WHERE fid > :fid', 0, 1, array(':fid' => 0))->fetchField(); } } diff -u media.module media.module --- media.module 21 Jan 2011 02:42:40 -0000 +++ media.module 21 Jan 2011 02:42:40 -0000 @@ -953,7 +953,7 @@ $media->file[LANGUAGE_NONE][0] = (array)$file + $defaults; $media->is_new = TRUE; // @todo Why aren't we calling media_save()? Since we aren't, we have to - // duplicate some of its code. + // duplicate some of its code. field_attach_presave('media', $media); field_attach_update('media', $media); //field_attach_insert('media', $media); @@ -1210,7 +1210,7 @@ cache_clear_all('*', 'cache_filter', TRUE); // The Field API caches filtered text in the field cache, so clear that too. // @todo Consider an EntityFieldQuery to limit this to entities that use a - // text format that includes the media filter. + // text format that includes the media filter. cache_clear_all('*', 'cache_field', TRUE); }