I have a database with files which can be searched, browsed and have multiple copies on multiple servers.
I cache searches, browse pages and server locations (urls). Say
See Organizing memcache keys
Unless you can "master key" items, there's no sane way to do this. By this I mean something like "user4231-is_valid". You could check that for anything that used that user's data. Otherwise, unless you're tracking everything that references your file in question, you can't invalidate all of them. If you do that, you still have to iterate all possibilities in order to successfully delete.
Document your dependencies, limit your dependencies, track your dependencies in your code for deletion activities.