Bug 250133 [Contexts] ContextAction's leak when hiding actions sets
bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/contexts/ContextManager.java
/**
	 * Set the manager to cache context id changes.
	 * 
	 * @param cache
	 *            <code>true</code> to turn caching on, <code>false</code>
	 *            to turn caching off and send an event if necessary.
	 * @since 3.3
	 */
	private void setEventCaching(boolean cache) {
		if (caching == cache) {
			return;
		}
		caching = cache;
		boolean fireChange = activeContextsChange;
		Set holdOldIds = (oldIds==null?Collections.EMPTY_SET:oldIds);
		
		if (caching) {
			oldIds = new HashSet(activeContextIds);
		} else {
			oldIds = null;
		}
		activeContextsChange = false;
		if (!caching && fireChange) {
			fireContextManagerChanged(new ContextManagerEvent(this, null,
					false, true, holdOldIds));
		}
	}
}