File tree 3 files changed +1
-33
lines changed
3 files changed +1
-33
lines changed Original file line number Diff line number Diff line change 28
28
29
29
$ app = new CmOta ();
30
30
$ app
31
- ->setConfig ( 'basePath ' , 'https:// ' .$ _SERVER ['HTTP_HOST ' ] )
32
- ->setConfig ( 'memcached.host ' , 'localhost ' )
33
- ->setConfig ( 'memcached.port ' , 11211 )
34
- ->enableMemcached ()
35
31
->run ();
Original file line number Diff line number Diff line change @@ -39,19 +39,6 @@ public function __construct() {
39
39
$ this ->initBuilds ();
40
40
}
41
41
42
- /**
43
- * Enable memcached feature
44
- * @return class Return always itself, so it can be chained within calls
45
- */
46
- public function enableMemcached () {
47
- Flight::register ( 'mc ' , 'Memcached ' , array (), function ( $ mc ) {
48
- $ mc ->addServer ( Flight::cfg ()->get ( 'memcached.host ' ) , Flight::cfg ()->get ( 'memcached.port ' ) );
49
- Flight::cfg ()->set ( 'memcached.enabled ' , true );
50
- });
51
-
52
- return $ this ;
53
- }
54
-
55
42
/**
56
43
* Get the global configuration
57
44
* @return array The whole configuration until this moment
Original file line number Diff line number Diff line change @@ -108,22 +108,7 @@ private function getBuilds() {
108
108
$ files = preg_grep ( '/^([^.Thumbs])/ ' , scandir ( $ path ) );
109
109
if ( count ( $ files ) > 0 ) {
110
110
foreach ( $ files as $ file ) {
111
-
112
- // Try to find the build using memcached
113
- if ( Flight::cfg ()->get ( 'memcached.enabled ' ) ) {
114
- $ build = Flight::mc ()->get ( $ file );
115
-
116
- // If not found there, we have to find it with the old fashion method...
117
- if ( !$ build && Flight::mc ()->getResultCode () == Memcached::RES_NOTFOUND ) {
118
- $ build = new Build ( $ file , $ path );
119
- // ...and then save it for the next lookup
120
- Flight::mc ()->set ( $ file , serialize ($ build ), MEMCACHE_COMPRESSED );
121
- // If we have found it, just unserialize it and continue
122
- } else {
123
- $ build = unserialize ( $ build );
124
- }
125
- } else
126
- $ build = new Build ( $ file , $ path );
111
+ $ build = new Build ( $ file , $ path );
127
112
128
113
if ( $ build ->isValid ( $ this ->postData ['params ' ] ) ) {
129
114
array_push ( $ this ->builds , $ build );
You can’t perform that action at this time.
0 commit comments