Priority value stored in the mem_cache_object is => 0.
The stored value increases with the priority of the cached entry.
A smaller value means a smaller priority.
All the logic in cache_pqueue for Bubbling Up and Percolating Down
is wrong. It does not ensure that the smallest element is always at the root
of the heap.
Attached is a patch fixing that problem.
If agreeing, could someone commit it please.