Couchbase   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
dl 0
loc 8
rs 10
c 1
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
1
<?php
2
3
namespace MatthiasMullie\Scrapbook\Adapters\Collections;
4
5
use MatthiasMullie\Scrapbook\Adapters\Collections\Utils\PrefixReset;
6
use MatthiasMullie\Scrapbook\Adapters\Couchbase as Adapter;
7
8
/**
9
 * Couchbase adapter for a subset of data, accomplished by prefixing keys.
10
 *
11
 * Couchbase supports multiple buckets. However, there's no overarching "server"
12
 * that can flush all the buckets (apart from looping all of them)
13
 * It may also not be possible to get into another bucket: they may have
14
 * different credentials.
15
 * And it's less trivial to "create" a new bucket. It could be done (although
16
 * not from the `CouchbaseBucket` we have in the adapter), but needs config.
17
 *
18
 * I'll implement collections similar to how they've been implemented for
19
 * Memcached: prefix keys & a reference value that can be changed to "flush"
20
 * the cache. If people want multiple different buckets, they can easily create
21
 * multiple Couchbase adapter objects.
22
 *
23
 * @author Matthias Mullie <[email protected]>
24
 * @copyright Copyright (c) 2014, Matthias Mullie. All rights reserved
25
 * @license LICENSE MIT
26
 */
27
class Couchbase extends PrefixReset
28
{
29
    /**
30
     * @param string $name
31
     */
32
    public function __construct(Adapter $cache, $name)
33
    {
34
        parent::__construct($cache, $name);
35
    }
36
}
37