]> BookStack Code Mirror - bookstack/commitdiff
Closes #69. Implemented and tested memcached. 71/head
authorNick Walke <redacted>
Thu, 3 Mar 2016 02:44:00 +0000 (20:44 -0600)
committerNick Walke <redacted>
Thu, 3 Mar 2016 02:44:00 +0000 (20:44 -0600)
.env.example
config/cache.php

index 6d706abddf5ff6c0d5632275136f697fd7593199..9d42d7487d89b4a45d8a9dc7b88c9c968d42acf0 100644 (file)
@@ -12,6 +12,9 @@ DB_PASSWORD=database_user_password
 # Cache and session
 CACHE_DRIVER=file
 SESSION_DRIVER=file
+# If using Memcached, comment the above and uncomment these
+#CACHE_DRIVER=memcached
+#SESSION_DRIVER=memcached
 QUEUE_DRIVER=sync
 
 # Storage
@@ -54,3 +57,8 @@ MAIL_PORT=1025
 MAIL_USERNAME=null
 MAIL_PASSWORD=null
 MAIL_ENCRYPTION=null
+
+# Memcached settings
+#MEMCACHED_HOST=127.0.0.1
+# If using a UNIX socket path for the host, set the port to 0
+#MEMCACHED_PORT=11211
\ No newline at end of file
index 379135b0eb6904733cc3ac4f569b4df04ad15d9e..b00a9989ee3bd894b19d584e4556e138a55aa367 100644 (file)
@@ -51,7 +51,9 @@ return [
             'driver'  => 'memcached',
             'servers' => [
                 [
-                    'host' => '127.0.0.1', 'port' => 11211, 'weight' => 100,
+                    'host' => env('MEMCACHED_HOST', '127.0.0.1'),
+                    'port' => env('MEMCACHED_PORT', 11211),
+                    'weight' => 100,
                 ],
             ],
         ],