cache the referenced query result