PHP code example of ripples / memcached-sasl

1. Go to this page and download the library: Download ripples/memcached-sasl library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

ripples / memcached-sasl example snippets


// bootstrap/app.php
$app->register(Ripples\Memcached\MemcachedSaslServiceProvider::class);

return [
    'default' => 'memcached_sasl',

    'stores' => [
        'memcached_sasl' => [
            'driver' => 'memcached_sasl',
            'servers' => [
                [
                    'host' => env('MEMCACHED_HOST', '127.0.0.1'),
                    'port' => env('MEMCACHED_PORT', 11211),
                    'weight' => 100
                ]
            ],
            'auth' => [
                'username' => env('MEMCACHED_USERNAME', ''),
                'password' => env('MEMCACHED_PASSWORD', '')
            ]
        ],
    ]
]