fix(db): query cache properly handles more callable types