Added cache for mask-based queries - including region target