tx for the reply Fabie

On Thu, Mar 5, 2009 at 11:28 PM, Fabien MARTY <[email protected]>wrote:

> Hi,
> - Show quoted text -
>
> On Thu, Mar 5, 2009 at 8:05 AM, Apostol Victor <[email protected]>
> wrote:
> > since this is may first post here, i first wish to say @Hello all.
> > In our projects we're using memcache for some times, changing from file
> > system based solutions since the later ones were not stable anymore when
> > traffic grew up (operations on file system are not atomic and we've
> > encountered often overload on database system).
> > Recently we've adopted Zend Framework as our core development framework
> and
> > implemented memcache but I've noticed that the "weight" parameter used
> for
> > addServer method (memcache library) is not available for
> > Zend_Cache_Backend_Memcached backend.
> > Is not difficult to add this but i don't feel comfortable in changing
> > sources of the Framework or extending them for these kind of reasons.
> > Although "weight" is an optional parameter, for a big pool of memcache
> > servers may be important specially when you're using machines running for
> > different other services and having different amount of memory available.
> > I don't understand why they missed this...if somebody here have some
> ideas
> > about this, feel free to speak about them.
>
> It was done but not documented.
>
> Now, it's done and documented (in SVN trunk).
>
> Here is all available options :
>
>    /**
>     * Available options
>     *
>     * =====> (array) servers :
>     * an array of memcached server ; each memcached server is
> described by an associative array :
>     * 'host' => (string) : the name of the memcached server
>     * 'port' => (int) : the port of the memcached server
>     * 'persistent' => (bool) : use or not persistent connections to
> this memcached server
>     * 'weight' => (int) : number of buckets to create for this server
> which in turn control its
>     *                     probability of it being selected. The
> probability is relative to the total
>     *                     weight of all servers.
>     * 'timeout' => (int) : value in seconds which will be used for
> connecting to the daemon. Think twice
>     *                      before changing the default value of 1
> second - you can lose all the
>     *                      advantages of caching if your connection
> is too slow.
>     * 'retry_interval' => (int) : controls how often a failed server
> will be retried, the default value
>     *                             is 15 seconds. Setting this
> parameter to -1 disables automatic retry.
>     * 'status' => (bool) : controls if the server should be flagged as
> online.
>     *
>     * =====> (boolean) compression :
>     * true if you want to use on-the-fly compression
>     *
>     * =====> (boolean) compatibility :
>     * true if you use old memcache server or extension
>     *
>     * @var array available options
>     */
>    protected $_options = array(
>        'servers' => array(array(
>            'host' => self::DEFAULT_HOST,
>            'port' => self::DEFAULT_PORT,
>            'persistent' => self::DEFAULT_PERSISTENT,
>            'weight'  => self::DEFAULT_WEIGHT,
>            'timeout' => self::DEFAULT_TIMEOUT,
>            'retry_interval' => self::DEFAULT_RETRY_INTERVAL,
>            'status' => self::DEFAULT_STATUS
>        )),
>        'compression' => false,
>        'compatibility' => false,
>    );
>
>
> Regards
>
> --
> Fabien MARTY
> [email protected]
>



-- 
victor

http://apostolvictor.info

Reply via email to