Is the GAC a memory area or hard disk area (C:\windows\Microsoft.NET\Assembly\...
)
I am confused by the word cache in GAC?
views:
226answers:
7GAC is a folder:
C:\Windows\Microsoft.NET\assembly
The assemblies stored in the folder(s) under that folder are in the GAC. You add assemblies to the GAC by signing them, then using gacutil
to add them. The GAC is one of the locations a managed assembly will look for any external references.
The GAC itself is a located on the hard disk at %systemroot%\Assembly
.
Obviously, the binaries themselves are loaded to memory at runtime.
The cache in GAC semantically refers to a general repository for binaries.
As mentioned already the GAC is the location on the harddisk (%systemroot%/assembly). In this context the term cache refers to the storage of goods, so this is a common location where strongly named versioned assemblies are stored and accessed by .NET applications.
GAC is stored physically on your hard drive. You can see physical files from command line using this:
dir %WINDIR%\assembly\GAC_32
The Global Assembly Cache (GAC) is located on your hard drive, by default C:\Windows\Assembly
, and I also noticed after verification that you may also have libraries at C:\Windows\Microsoft.NET\GAC_[XX]
, where [XX] stands for 32 or 64 bits or MSIL (Microsoft Intermediate Language) assuming your system drive is C:.
You can follow the links referenced to learn more.
A cache is any mechanism which improves the response time of loading data without the client having to take further actions: the client is requesting the data in the “normal” way and the cache basically intercepts these requests and may on occasions deliver data without having to forward the request to the actual data provider.
This isn’t in any way specific to memory based. Caches exist for various scenarios, on the CPU to improve access time of the RAM, in web browsers to improve access time of web resources – and, in this case, as a folder of precompiled assemblies on disk to improve accessing DLLs (which otherwise would have to be compiled).
GAC is on disk. Imagine keeping all the signed assemblies in memory...