Provides a reliable cache for HashMap<Key, Value> where value can be derived from key, but could be expensive to generate.
The cache is thread safe and can be used in multi-threaded environment.
The cache is not async, so it is not suitable for async environment.
For async cache, use CasheAsync instead.
FromWatchedFile is a struct that reads a file and watches for changes to the file.
When the file changes, the struct will reload the file and update the value in the background.
This struct is useful for reloading configuration files or other files that are read frequently.
It is thread safe. Note: Each FromWatchedFile spawns a new thread to watch the file do not use too many of them!