src/vs/workbench/contrib/search/common/cacheState.ts/FileQueryCacheState/constructor
class FileQueryCacheState:	constructor(
		private cacheQuery: (cacheKey: string) => IFileQuery,
		private loadFn: (query: IFileQuery) => Promise<any>,
		private disposeFn: (cacheKey: string) => Promise<void>,
		private previousCacheState: FileQueryCacheState | undefined
	) {
		if (this.previousCacheState) {
			const current = Object.assign({}, this.query, { cacheKey: null });
			const previous = Object.assign({}, this.previousCacheState.query, { cacheKey: null });
			if (!equals(current, previous)) {
				this.previousCacheState.dispose();
				this.previousCacheState = undefined;
			}
		}
	}