---
title: "what is MVC-ControllerTypeCache.xml in MVC"  
description: "what is MVC-ControllerTypeCache.xml in MVC"  
author: "Elena Glibart"  
published: 2015-01-22  
updated: 2015-01-22  
canonical: https://www.mindstick.com/forum/12889/what-is-mvc-controllertypecache-xml-in-mvc  
category: "asp.net"  
tags: ["asp.net mvc", "mvc4", "controller"]  
reading_time: 1 minute  

---

# what is MVC-ControllerTypeCache.xml in MVC

While [debugging](https://www.mindstick.com/blog/393/javascript-debugging) [ASP.NET MVC](https://www.mindstick.com/forum/155798/what-is-caching-in-asp-dot-net-mvc) [source](https://www.mindstick.com/interview/840/what-happens-if-the-both-source-and-destination-are-named-same) i found **"MVC-ControllerTypeCache.xml"** [file](https://www.mindstick.com/articles/59/encrypting-and-decrypting-files-using-c-sharp) is used. But i am not able to understand the use of this file.I [mean](https://yourviews.mindstick.com/view/80768/what-does-real-minority-mean) where is this file [stored](https://www.mindstick.com/forum/157561/what-is-the-stored-procedure-create-a-procedure-to-find-the-record-by-stu_id-from-the-student-table)? How asp.net MVc makes use of this file? Please help.

## Replies

### Reply by Lillian Martin

The file is used to cache controller types to avoid expensive reflection lookups. It is dynamically generated and stored in the c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary [ASP.NET](https://www.mindstick.com/articles/934/default-folders-available-inside-the-asp-dot-net-application-folder) Files\NAMEOFYOURAPP\xxxxx\xxxxxxxx\UserCache\ folder.

It's handled by the TypeCacheUtil internal class that you could find in the TypeCacheUtil.cs in the ASP.NET [MVC](https://www.mindstick.com/forum/155803/define-cache-profile-in-mvc) source code.

**Here's an example of how this file might look like:**

```
<?xml version="1.0" encoding="utf-8"?><!--This file is automatically generated. Please do not
modify the contents of this file.--><typeCache lastModified="04/01/2012 16:35:03" mvcVersionId="3cff62e5-ef21-4e58-897f-d0f1eafd3beb">  <assembly name="Custom.Web.Mvc,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=null">    <module versionId="0bd9573a-7a89-4eab-b33d-cc92573fc2ba">      <type>APPNAME.Controllers.BaseController</type>    </module>  </assembly>  <assembly name="APPNAME.BusinessLogic,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">    <module versionId="3fb0cce6-10dd-43d3-a44c-00046017b574">      <type>APPNAME.BusinessLogic.Controllers.AssetsController</type>      <type>APPNAME.BusinessLogic.Controllers.HomeController</type>    </module>  </assembly>  <assembly name="MvcContrib,
Version=2.0.36.0, Culture=neutral, PublicKeyToken=null">    <module versionId="889dd733-c7a0-4ae6-8f50-934f417174ea">      <type>MvcContrib.PortableAreas.EmbeddedResourceController</type>      <type>MvcContrib.SubController</type>    </module>  </assembly></typeCache>
```

There's also the MVC-AreaRegistrationTypeCache.xml which is used to cache areas.


---

Original Source: https://www.mindstick.com/forum/12889/what-is-mvc-controllertypecache-xml-in-mvc

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
