protected function registerCouchbaseBucketCacheDriver(): void
    {
        $this->app['cache']->extend('couchbase', function ($app, $config) {
            /** @var \Couchbase\Cluster $cluster */
            $cluster = $app['db']->connection($config['driver'])->getCouchbase();
            $password = (isset($config['bucket_password'])) ? $config['bucket_password'] : '';

            return new Repository(
                new CouchbaseStore(
                    $cluster,
                    $config['bucket'],
                    $password,
                    $app['config']->get('cache.prefix')
                )
            );
        });
    }
protected function registerCouchbaseBucketCacheDriver(): void
    {
        $this->app['cache']->extend('couchbase', function ($app, $config) {
            /** @var \Couchbase\Cluster $cluster */
            $cluster = $app['db']->connection($config['driver'])->getCouchbase();
            $password = (isset($config['bucket_password'])) ? $config['bucket_password'] : '';

            return new Repository(
                new CouchbaseStore(
                    $cluster,
                    $config['bucket'],
                    $password,
                    $app['config']->get('cache.prefix')
                )
            );
        });
    }
protected function registerCouchbaseBucketCacheDriver ( ) : void { $ this -> app [ 'cache' ] -> extend ( 'couchbase' , function ( $ app , $ config ) { /** @var \Couchbase\Cluster $cluster */ $ cluster = $ app [ 'db' ] -> connection ( $ config [ 'driver' ] ) -> getCouchbase ( ) ; $ password = ( isset ( $ config [ 'bucket_password' ] ) ) ? $ config [ 'bucket_password' ] : '' ; return new Repository ( new CouchbaseStore ( $ cluster , $ config [ 'bucket' ] , $ password , $ app [ 'config' ] -> get ( 'cache.prefix' ) ) ) ; } ) ; }
register 'couchbase' cache driver.
for bucket type couchbase.
register couchbase cache driver . for bucket type couchbase .