You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Randall C. O'Reilly edited this page Dec 31, 2018
·
2 revisions
The syms package, cache.go file has various functions for managing the caching of Symbols and Types generated during parsing.
The overall cache dir is in os.UserCacheDir()/GoPi, see: os GoDocs which is:
Linux: $XDG_CACHE_HOME or ~/.cache
MacOS (darwin): ~/Library/Cache
Windows: %LocalAppData%
Under the GoPi subdirectory, there are separate directories for each language, e.g., Go etc.
Files are all saved directly in that one directory, with each file encoded with its path, using % instead of / for path separators.
It is up to the specific language to directly manage the cache saving / loading process -- see Go example ParseDir method that does this for Go -- the relevant helper code is all in syms/cache.go which does all the hard work..
Cached data is automatically updated when the parser is updated, or when the files in the directory are newer than the cache.