piegamesde / BlockMap

An out-of-game map renderer and viewer for Minecraft 1.13–1.18 worlds [unmaintained]
MIT License
92 stars 22 forks source link

Feature/player skin cache #50

Closed saibotk closed 3 years ago

saibotk commented 3 years ago

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.