This implements a simple player profile and image cache.
This is done, mainly to avoid the TooManyRequests exceptions of the Mojang API.
Simple implementations of both caches are included, which both cache their content locally for 60 seconds (can be adjusted if wanted), as 60 seconds is the timeout needed, before requesting the same player profile again.
Both cache implementations simply store their content in the cache directory and check the last modified date of the files, when purging old content.
This implements a simple player profile and image cache.
This is done, mainly to avoid the
TooManyRequests
exceptions of the Mojang API. Simple implementations of both caches are included, which both cache their content locally for 60 seconds (can be adjusted if wanted), as 60 seconds is the timeout needed, before requesting the same player profile again.Both cache implementations simply store their content in the cache directory and check the last modified date of the files, when purging old content.