Setting priorities on cache queues