1 | <?php |
||
2 | /** |
||
3 | * Copyright (c) 2018 Justin Kuenzel (jukusoft.com) |
||
4 | * |
||
5 | * Licensed under the Apache License, Version 2.0 (the "License"); |
||
6 | * you may not use this file except in compliance with the License. |
||
7 | * You may obtain a copy of the License at |
||
8 | * |
||
9 | * http://www.apache.org/licenses/LICENSE-2.0 |
||
10 | * |
||
11 | * Unless required by applicable law or agreed to in writing, software |
||
12 | * distributed under the License is distributed on an "AS IS" BASIS, |
||
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||
14 | * See the License for the specific language governing permissions and |
||
15 | * limitations under the License. |
||
16 | */ |
||
17 | |||
18 | /** |
||
19 | * Memcached configuration |
||
20 | * |
||
21 | * PSF Framework doesnt require memcached, but you can use it to speed up your website. |
||
22 | * Note: If you want to use memcached, you have also to configure in file cache.php |
||
23 | * |
||
24 | * Attention! - memcache and memcached arent the same! |
||
25 | */ |
||
26 | |||
27 | //Memcache Statistic Report: https://github.com/DBezemer/memcachephp |
||
28 | |||
29 | //http://php.net/manual/de/memcache.examples-overview.php |
||
30 | //http://php.net/manual/de/class.memcached.php |
||
31 | |||
32 | //you can configure more than 1 memcache server, if you want to use redundancy |
||
33 | |||
34 | $memcached_config = array( |
||
35 | 'server' => array( |
||
36 | array( |
||
37 | 'host' => "127.0.0.1", |
||
38 | 'port' => "11211" |
||
39 | ), |
||
40 | /*array( |
||
41 | 'host' => "127.0.0.1", |
||
42 | 'port' => "11211" |
||
43 | ),*/ |
||
44 | ), |
||
45 | /** |
||
46 | * authentification is optional with memcached |
||
47 | * |
||
48 | * If you want to use authentification, your memcached PECL extension has to be build with SASL! |
||
49 | */ |
||
50 | 'authentification' => array( |
||
51 | /** |
||
52 | * enabled: |
||
53 | * |
||
54 | * true - authentification for memcached is enabled |
||
55 | * false - authentification will not be used for memcached |
||
56 | */ |
||
57 | 'enabled' => false, |
||
58 | 'username' => "", |
||
59 | 'password' => "", |
||
60 | ), |
||
61 | //some optional memcached options, for more options visit http://php.net/manual/de/memcached.constants.php |
||
62 | 'options' => array( |
||
63 | Memcached::OPT_CONNECT_TIMEOUT => 10, |
||
64 | Memcached::OPT_DISTRIBUTION => Memcached::DISTRIBUTION_CONSISTENT, |
||
65 | Memcached::OPT_SERVER_FAILURE_LIMIT => 2, |
||
66 | Memcached::OPT_RETRY_TIMEOUT => 1, |
||
67 | Memcached::OPT_REMOVE_FAILED_SERVERS => true, |
||
68 | |||
69 | //you can also use an prefix like in an mysql database for tables |
||
70 | Memcached::OPT_PREFIX_KEY => "cms_", |
||
71 | ) |
||
72 | ); |
||
73 | |||
74 | ?> |
||
0 ignored issues
–
show
|
Using a closing tag in PHP files that only contain PHP code is not recommended as you might accidentally add whitespace after the closing tag which would then be output by PHP. This can cause severe problems, for example headers cannot be sent anymore.
A simple precaution is to leave off the closing tag as it is not required, and it also has no negative effects whatsoever.