Add aditional checks in cache purge.