File tree 1 file changed +7
-9
lines changed
Filter options
src/Symfony/Component/Cache/Adapter 1 file changed +7
-9
lines changed
Original file line number Diff line number Diff line change @@ -18,24 +18,23 @@ class MemcachedAdapter extends AbstractAdapter
18
18
{
19
19
private $ client ;
20
20
21
- public static function isSupported ()
22
- {
23
- return extension_loaded ('memcached ' ) && version_compare (phpversion ('memcached ' ), '2.2.0 ' , '>= ' );
24
- }
25
-
26
21
public function __construct (\Memcached $ client , $ namespace = '' , $ defaultLifetime = 0 )
27
22
{
28
23
parent ::__construct ($ namespace , $ defaultLifetime );
29
24
$ this ->client = $ client ;
30
25
}
31
26
27
+ public static function isSupported ()
28
+ {
29
+ return extension_loaded ('memcached ' ) && version_compare (phpversion ('memcached ' ), '2.2.0 ' , '>= ' );
30
+ }
31
+
32
32
/**
33
33
* {@inheritdoc}
34
34
*/
35
35
protected function doSave (array $ values , $ lifetime )
36
36
{
37
- return $ this ->client ->setMulti ($ values , $ lifetime )
38
- && $ this ->client ->getResultCode () === \Memcached::RES_SUCCESS ;
37
+ return $ this ->client ->setMulti ($ values , $ lifetime ) && $ this ->client ->getResultCode () === \Memcached::RES_SUCCESS ;
39
38
}
40
39
41
40
/**
@@ -51,8 +50,7 @@ protected function doFetch(array $ids)
51
50
*/
52
51
protected function doHave ($ id )
53
52
{
54
- return $ this ->client ->get ($ id ) !== false
55
- || $ this ->client ->getResultCode () === \Memcached::RES_SUCCESS ;
53
+ return $ this ->client ->get ($ id ) !== false || $ this ->client ->getResultCode () === \Memcached::RES_SUCCESS ;
56
54
}
57
55
58
56
/**
You can’t perform that action at this time.
0 commit comments