public function putItem($cache, $key, $item)
    {
        $cache = self::encodeCache($cache);
        $key = self::encodeKey($key);
        $itm = new IronCache_Item($item);
        $req = $itm->asArray();
        $url = "projects/{$this->project_id}/caches/$cache/items/$key";

        $this->setJsonHeaders();
        $res = $this->apiCall(self::PUT, $url, $req);
        return self::json_decode($res);
    }
public function putItem($cache, $key, $item)
    {
        $cache = self::encodeCache($cache);
        $key = self::encodeKey($key);
        $itm = new IronCache_Item($item);
        $req = $itm->asArray();
        $url = "projects/{$this->project_id}/caches/$cache/items/$key";

        $this->setJsonHeaders();
        $res = $this->apiCall(self::PUT, $url, $req);
        return self::json_decode($res);
    }
public function putItem ( $ cache , $ key , $ item ) { $ cache = self :: encodeCache ( $ cache ) ; $ key = self :: encodeKey ( $ key ) ; $ itm = new IronCache_Item ( $ item ) ; $ req = $ itm -> asArray ( ) ; $ url = "projects/{$this->project_id}/caches/$cache/items/$key" ; $ this -> setJsonHeaders ( ) ; $ res = $ this -> apiCall ( self :: PUT , $ url , $ req ) ; return self :: json_decode ( $ res ) ; }
Push a item on the cache at 'key'

Examples:
<code>
$cache->putItem("test_cache", 'default', "Hello world");
</code>
<code>
$cache->putItem("test_cache", 'default', array(
"value" => "Test Item",
'expires_in' => 2*24*3600, # 2 days
"replace" => true
));
</code>

@param string $cache Name of the cache.
@param string $key Item key.
@param array|string $item

@return mixed
Push a item on the cache at key