function storeAssociation($server_url, $association)
    {
        // create memcached keys for association itself
        // and list of associations for this server
        $associationKey = $this->associationKey($server_url,
            $association->handle);
        $serverKey = $this->associationServerKey($server_url);

        // get list of associations
        $serverAssociations = $this->connection->get($serverKey);

        // if no such list, initialize it with empty array
        if (!$serverAssociations) {
            $serverAssociations = array();
        }
        // and store given association key in it
        $serverAssociations[$association->issued] = $associationKey;

        // save associations' keys list
        $this->connection->set(
            $serverKey,
            $serverAssociations,
            $this->compress
        );
        // save association itself
        $this->connection->set(
            $associationKey,
            $association,
            $this->compress,
            $association->issued + $association->lifetime);
    }
function storeAssociation($server_url, $association)
    {
        // create memcached keys for association itself
        // and list of associations for this server
        $associationKey = $this->associationKey($server_url,
            $association->handle);
        $serverKey = $this->associationServerKey($server_url);

        // get list of associations
        $serverAssociations = $this->connection->get($serverKey);

        // if no such list, initialize it with empty array
        if (!$serverAssociations) {
            $serverAssociations = array();
        }
        // and store given association key in it
        $serverAssociations[$association->issued] = $associationKey;

        // save associations' keys list
        $this->connection->set(
            $serverKey,
            $serverAssociations,
            $this->compress
        );
        // save association itself
        $this->connection->set(
            $associationKey,
            $association,
            $this->compress,
            $association->issued + $association->lifetime);
    }
function storeAssociation ( $ server_url , $ association ) { // create memcached keys for association itself // and list of associations for this server $ associationKey = $ this -> associationKey ( $ server_url , $ association -> handle ) ; $ serverKey = $ this -> associationServerKey ( $ server_url ) ; // get list of associations $ serverAssociations = $ this -> connection -> get ( $ serverKey ) ; // if no such list, initialize it with empty array if ( ! $ serverAssociations ) { $ serverAssociations = array ( ) ; } // and store given association key in it $ serverAssociations [ $ association -> issued ] = $ associationKey ; // save associations' keys list $ this -> connection -> set ( $ serverKey , $ serverAssociations , $ this -> compress ) ; // save association itself $ this -> connection -> set ( $ associationKey , $ association , $ this -> compress , $ association -> issued + $ association -> lifetime ) ; }
Store association until its expiration time in memcached.
Overwrites any existing association with same server_url and
handle. Handles list of associations for every server.

@param string $server_url
@param Auth_OpenID_Association $association
Store association until its expiration time in memcached . Overwrites any existing association with same server_url and handle . Handles list of associations for every server .