Working on AMSproxy: adding cache functionality, changing to use Promise