Hey mgood
Thanks for your suggestions. That's a very nice documentation there.
In my case the whole idea behind using a common EntityManager for the application is "better performance".
When the same page is revisited, we don't want to load all the data again from database. If we make use of cache, then we save lot of time.
But in other way, we don't want to keep the outdated entities in cache. It is possible that some thing might have been updated in database from some other client. So at certain intervals we want to remove SPECIFIC(not all) entities from cache, so that we get latest to show when queried for. And also we don't want to occupy more memory with more data. That is the other reason we want to clear some entities at regular intervals.
Using a different entity manager for each unit of code won't give the advantage of loading from cache when it is revisited. If all separate EntityManagers are made to persist for the life time of application then again comes the problem with memory consumption.
So if QueryCache.Remove is working properly or RemoveEntity method automatically handles removing of only related queries from query cache, then it would solve problem of all developers who want to take care memory.
Thanks
Manju