Z sort now only happens when refreshing cache