bugs with promise pattern and cache when running from php