handle visible layers query when using the cached layer