Fix ap query cache return value