GAC是内存区还是硬盘区?

发布于 2024-09-01 09:15:28 字数 92 浏览 1 评论 0原文

GAC是内存区域还是硬盘区域(C:\windows\Microsoft.NET\Assembly\...) 我对 GAC 中的缓存一词感到困惑?

Is the GAC a memory area or hard disk area (C:\windows\Microsoft.NET\Assembly\...)
I am confused by the word cache in GAC?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(7

舟遥客 2024-09-08 09:15:28

GAC 是一个文件夹:

C:\Windows\Microsoft.NET\ assembly

存储在该文件夹下的文件夹中的程序集位于 GAC 中。您可以通过对程序集进行签名来将程序集添加到 GAC,然后使用 gacutil 添加它们。 GAC 是托管程序集查找任何外部引用的位置之一。

GAC 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.

余生共白头 2024-09-08 09:15:28

GAC 本身位于硬盘上的%systemroot%\Assembly

显然,二进制文件本身在运行时加载到内存中。

GAC 中的缓存在语义上指的是二进制文件的通用存储库。

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.

挽清梦 2024-09-08 09:15:28

缓存是任何可以提高加载数据响应时间的机制客户端无需采取进一步操作:客户端以“正常”方式请求数据,缓存基本上会拦截这些请求,有时可能会传递数据,而无需将请求转发给实际的数据提供者。

这绝不是特定于基于内存的。缓存存在于各种场景中,在 CPU 上是为了提高 RAM 的访问时间,在 Web 浏览器中是为了提高 Web 资源的访问时间,在这种情况下,缓存作为磁盘上预编译程序集的文件夹以提高对 DLL 的访问(否则会必须编译)。

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).

总以为 2024-09-08 09:15:28

GAC 物理存储在您的硬盘上。您可以使用以下命令从命令行查看物理文件:

dir %WINDIR%\assembly\GAC_32

GAC is stored physically on your hard drive. You can see physical files from command line using this:

dir %WINDIR%\assembly\GAC_32
归途 2024-09-08 09:15:28

如前所述,GAC 是硬盘上的位置 (%systemroot%/assembly)。在此上下文中,术语缓存指的是货物的存储,因此这是 .NET 应用程序存储和访问强命名版本化程序集的常见位置。

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.

感情洁癖 2024-09-08 09:15:28

全局程序集缓存 (GAC) 位于您的硬盘上,默认情况下C:\Windows\Assembly,并且经过验证我还注意到您可能在C:\Windows\Microsoft.NET\GAC_[XX]也有库,其中 [XX] 代表 32 或 64 位或 MSIL ( Microsoft 中间语言)假设您的系统驱动器是 C:。

您可以点击引用的链接来了解更多信息。

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.

誰認得朕 2024-09-08 09:15:28

GAC 在磁盘上。想象一下将所有签名的程序集保存在内存中......

GAC is on disk. Imagine keeping all the signed assemblies in memory...

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文