Closed (outdated)
Project:
Drupal core
Version:
7.x-dev
Component:
aggregator.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
15 Mar 2009 at 03:24 UTC
Updated:
23 Sep 2014 at 20:48 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
marcingy commentedCache call removed
Comment #3
mustafau commentedComment #4
dries commentedThis doesn't look 100% correct because we don't know if data was actually expired. In case of core, it would always return TRUE for example.
Comment #5
jody lynnComment #6
lambic commentedHere's an alternative patch, changing aggregator_expire to return true if items were expired
Comment #7
twistor commented@lambic, #6 doesn't remove the actual cache_clear_all() in question.
Comment #8
lambic commentedIt doesn't remove it, it makes it conditional.
Comment #9
twistor commentedhrm... If you look in patches #1 and #3 you'll see that the point of the patch is to remove the cache_clear_all() from aggregator.parser.inc. And make it conditional in aggregator.module.
Tell me if I'm way off base.
Comment #10
lambic commentedAh sorry, didn't notice there were two files being modified. New patch attached.
Comment #11
twistor commentedLooks good. Would aggregator_expire() be more useful if it returned count($iids)?
Comment #12
xjmThat seems reasonable. For example, we don't need to bother clearing the cache if 0 items were expired.
A couple of minor notes about the code comments:
This comment needs a period.
TRUE and FALSE should be capitalized, and there should be a period. However, if we're changing it to an integer, then we could say:
Note also that the Drupal 8.x patch will need to be rerolled, because the core directory structure for Drupal 8 has now changed. (For more information, see #22336: Move all core Drupal files under a /core folder to improve usability and upgrades).
Tagging as novice for three tasks:
Thanks!
Comment #13
kathyh commentedPatch updated per comments in #12
Comment #14
xjmThanks kathyh.
This won't actually return the number of items expired from the feed--as far as I can tell, it will only ever be incremented to 1. The executed delete query should return the number of items deleted, I think. I'd test it to make sure. (See http://drupal.org/node/310081).
Speaking of tests, maybe a test that ensures the cache is cleared if items are deleted, and ensures it is not cleared when no items are deleted. A debug message in some test module's
hook_flush_caches()would probably do the trick.Comment #15
ParisLiakos commentedNot a problem in D8 anymore