forked from pierskarsenbarg/codeigniter-session-memcached
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmemcached.php
More file actions
22 lines (20 loc) · 745 Bytes
/
memcached.php
File metadata and controls
22 lines (20 loc) · 745 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/*
|--------------------------------------------------------------------------
| Memcached Session Variables
|--------------------------------------------------------------------------
|
|
| "session_storage" = where you will be storing your session data. Accepts "memcached", "database", "cookie"
| "memcache_ports" = the port that you will connect to memcache on
| "memcached_nodes" = array of IP addresses of Memcached nodes
|
|
*/
if (extension_loaded('memcached')) {
$config['session_storage'] = 'memcached';
} else {
$config['session_storage'] = 'database';
}
$config['memcached_port'] = '11211';
$config['memcached_nodes'] = array('127.0.0.1');