Closed (fixed)
Project:
Rules
Version:
7.x-2.x-dev
Component:
Rules Engine
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Feb 2012 at 10:03 UTC
Updated:
26 Mar 2012 at 11:10 UTC
Jump to comment: Most recent file
Comments
Comment #1
vasi1186 commentedI attached a patch that should solve this issue.
Comment #3
vasi1186 commentedsorry, syntax error in the first patch...
Comment #5
vasi1186 commented#3: rules_cache-1425652-3.patch queued for re-testing.
Comment #6
fagoIndeed, we should not rely upon cache entries to exist once the data-cache exists.
To fix that I think we have to overhaul quite some of the cache clearing rebuilding though, I fear. Rebuilding just the whole cache on each cache miss and/or potential wrong calls does not look good to me.
Thus, I guess we should
* move component and event-set cache build logic out of rebuildCache(), which really should be used for building the 'data' cache only.
* implement per component / event-set cache build logic
* build this cache on demand
That way, we can save some time during the regular cache rebuild and do more fine-granular cache clears when changes are made.
In addition to that, I think we should introduce a lock which is active during the 'data' cache rebuild and require the data cache when building the compont/event-set cache - so we can be ensure no invalid caches are written due to concurrent requests.
Comment #8
fagoAlso see the related issue #1106508: Error with components after changing site structure: "Unable to get the component ..."
Comment #9
fagoI've implemented the improvements as outlined in #6 and committed them.
See http://drupalcode.org/project/rules.git/commit/d0a86e0
What I've not implemented are cache-rebuild routines for single event-sets or components - thus cache is always rebuilt for all event-sets or components. Usually we won't need single rebuilds anyways , however they would be fine for speeding up UI changes by reducing the number of necessary rebuilds. The committed changes already greatly reduce the necessary cache rebuilds when working in the UI anyways, so I'm not sure we need that single-rebuild improvement. If we want to, we can still add it as follow-up.