Add a lot of stuff to cache.js
NOT FINISHED: create map.js based on es6 Map