boxunphp/memcached

PHP Memcached Client

v2.1.2 2020-06-24 01:59 UTC

This package is auto-updated.

Last update: 2024-11-09 09:29:14 UTC


README

PHP Memcached Client

Usage

<?php
$config = array(
    'servers' => array(
        array('host' => '192.168.0.1', 'port' => 11211, 'weight' => 50),
        array('host' => '192.168.0.2', 'port' => 11211, 'weight' => 50),
    ),
    'connect_timeout' => 1000, // 单位微秒
);

$mc = Memcached::getInstance($config);