Hi guys,
As part of a strategy for scalling out our Portal Sharepoint MySites which is over 250k mysites, we decided to create an approach which is:
1- Create a PowerShell custom Job which will run twice a month looking for unuseful mysites and remove them gradually.
2- The users which lost the mysite due custom Powershell job will be redirected into a common page for users that  does not edit their sites. It will avoid having too many mysites.
3- If the user over the common static home page decided to edit (Add new web parts, Add pages, etc) we need to create a personal mysite then.
All this is working except for the #3 which works partially.
When an user confirm its edition from a Sharepoint popup we will call a RESTFul service throught jQuery Ajax async in order to leave the service the task to create mysite while it shows a wait page upon the client side (the important thing here is the callback).
Above is the Ajax call. When this call is performed we need to assume the following:
1- The user already lost mysite due to auto-deletion from powershell script.
2- There is no personal site for this user calling the service.
3- We will create a site for the user.
So we are sure the site its not present, the rest ful function is:
This function is throwing out a PersonalSiteExistsException even when the site is not present.Â
When it works:
When I recycle the application pool after deleting personal sites, the exception is not trow and the site is created properly.
I guess  there is something in the cache but I cannot realize on what is causing the exception.
Could someone guide me¡
Thanks a lot.
?width=750
It was correct guys, after removing the cache it solved the issue.
So is it the deletion happen right away ? Might be the dave solution to bypass the cleanup one would be good since I do not want to wait the job deletion since I will create sites over and over again.
Hey guys, you all rock. Thanks for help me