function update_message_status($payload, $email) { echo "Updating status\n"; //Ping your api echo "pinging api\n"; file_get_contents('http://google.com/?email=' . urlencode($email)); if (!empty($payload->token) && !empty($payload->project_id)) { //Or update date of last email in iron_cache echo "setting iron_cache\n"; $cache = new IronCache(array('token' => $payload->token, 'project_id' => $payload->project_id)); $res = $cache->putItem('mail', $email, date("D M d, Y G:i")); print_r($res); } }
/** * Clear a Cache * Delete all items in a cache bucket. This cannot be undone. * * @param string|null $cache Cache name or null * @return mixed * @throws CException */ public function cacheClear($cache = null) { try { return $this->_cache->clear($cache); } catch (Exception $e) { Yii::log('Error in Iron Cache: ' . $e->getMessage(), 'error', 'ext.yiiron'); throw new CException($e->getMessage()); } }