Create cache.js

please read the comments!