Weapon Factory Manager Caching is a module which implements several instances of caching into weaponfactorymanager.lua in order to make it much, much faster at calculating data for attachments.
Originally, weaponfactorymanager.lua repeats a lot of methods with the same input data, most of these methods also loop over tables several times. The overall result in this is that when a very, very large amount of attachments are present for a weapon the game freezes for seconds at a time.
In order to remedy this, this module implements caching to several of the functions in order to reduce the need to recalculate data several times over and over and instead store the data locally. This stored data can then be retrieved if a function detects it rather than trying to recalculate it again.
This module functions behind the scenes so nobody needs to do anything a part from install WeaponLib to gain the functionality from this module.