[backend] worker cache: sort before pruning