简体   繁体   English

Garry的mod缓存

[英]Garry's mod cache

for starters, I've been looking around for other Lua programmers who work on Gmod on Source Engine and know what they're talking about. 对于初学者,我一直在寻找其他在Source Engine上使用Gmod并知道他们在说什么的Lua程序员。 So if anyone knows any of this stuff, please tell me. 所以,如果有人知道这些东西,请告诉我。 So I've got a question regarding my Garry's mod Cache file. 所以我对我的Garry的mod Cache文件有疑问。 It's in the directory (this is an abbreviated directory) Steam/steamapps/GarrysMod/garrysmod/Cache. 它在目录(这是缩写目录)中Steam / steamapps / GarrysMod / garrysmod / Cache中。 Inside this file are two sub folders named "lua" and "workshop" respectively. 在此文件中,有两个分别名为“ lua”和“ workshop”的子文件夹。 Inside are several lua files filled with a strange type of code (presumably addresses for assets used in-game) and I've noticed that during some sessions, the game will generate a lot of these files and at other times, won't generate any at all. 里面有几个lua文件,里面充斥着一种奇怪的代码(大概是游戏中使用的资产的地址),我注意到在某些会话中,游戏会生成很多这样的文件,而在其他时候则不会生成任何的。 What are these files? 这些文件是什么? What are they used for? 它们是用来干什么的? And what dictates when a new cache lua file is generated? 什么决定何时生成新的缓存lua文件?

The cache in Garry's Mod houses clientside/shared Lua files that have been previously downloaded from a server. Garry的Mod中的缓存中包含以前从服务器下载的客户端/共享Lua文件。 When you join a server which is using an identical Lua file to which is in your cache, it will skip downloading that specific file and instead, use it from the cache. 当您加入使用与缓存中相同的Lua文件的服务器时,它将跳过下载该特定文件,而是从缓存中使用它。 Therefore, Lua files that aren't in your cache are downloaded when joining a server. 因此,加入服务器时,将下载不在缓存中的Lua文件。 Cached Lua files are LZMA compressed which is why you cannot directly read the files as Lua when you open it. 缓存的Lua文件是LZMA压缩的,这就是为什么您无法在打开文件时直接以Lua的形式读取文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM