BUG/MEDIUM: cache: use key=0 as a condition for freeing

The cache was trying to remove objects from the tree while they were
already removed from it. We set the key to 0 as a check for not trying
to remove the object from the tree when we are still using the object.
1 file changed