In our development environments we need to re-deploy our codebase on a regular basis. We go through a deployment process where we do the following steps (all through PowerShell):
- Delete our old site collection where it was last deployed (if it exists).
- Create the site collection.
- For each solution:
- Disable each feature in the solution (if it exists)
- Uninstall the solution (if it exists)
- Remove the solution (if it exists)
- Add the solution
- Install the solution
- Enable each feature in the solution
One of our solutions contains all of the list schema.
We are seeing a problem where changes in our list schema (esp. changes in the view definitions) do not show up when we run the steps above. SharePoint "remembers" the old definition somehow.
We have tried IISESET, restarting services such as OWSTimer, the user code service, and we have even tried restarting SQL server as well as tried using a new content database.
The only solution that seems to work is to reboot the SharePoint server (our dev environment is just a single server) before running our deployment steps above. This works every time, but is a pain and we want to avoid it. In our load test environment I reboot the app server and all WFEs (I do not reboot the SQL server). This seems to work in this multi-server environment.
There is a cache somewhere. We believe it is on disk and not in memory since we have stopped all manner of background processes that could be holding onto the cache.
My research has found that there is a "CacheSchema" property for the ListTemplate. We do not set this and I haven't seen any good description on what this is - everyone just reiterates what is on the link I just provided:
Optional Boolean. TRUE to enable schema caching of the list when provisioning a site. The CacheSchema attribute is used, for example, in the global Onet.xml file to enable caching of the user list for the current site collection.
Does anyone know if this could help? Is the default value of this property "TRUE"?
How in the world do we clear this cache?
Note that our solution uses content types and site columns for every list/field we create and that we deploy all solutions as sandboxed solutions.