[public-api] fix for 400 error in purgeDocument

Here's an updated fix for issue 203 which removes the purged document from the cache.