BUG: don't try to deal with a dead cache refereant (GH5216)
Merge pull request #5217 from jreback/cacher

BUG: don't try to deal with a dead cache referant (GH5216)