fix a php error by using WC_Cache