Couldn't the release function check that the count is zero and remove it from the cache if it is, eliminating the need to call purgeCache?