### Memcached
-To use memcached for caching and/or sessions open up your `.env` file and find the `CACHE_DRIVER` & `SESSION_DRIVER` variables. By default these are both set to `file`. Change these variables to `memcached`. You will also need to add a variable to specify the memcached servers you are using. To do this add a variable named `MEMCACHED_SERVERS` to the `.env` file and set the value to be you memcached servers in the following format: `HOST:PORT:WEIGHT, HOST2:PORT:WEIGHT`. You can specify as many servers as you want. Their usage split will be determined by the weight given to them. Here are some examples of what the `.env` file should look like:
+To use memcached for caching and/or sessions open up your `.env` file and find the `CACHE_DRIVER` & `SESSION_DRIVER` variables. By default these are both set to `file`. Change these variables to `memcached`. You will also need to add a variable to specify the memcached servers you are using. To do this add a variable named `MEMCACHED_SERVERS` to the `.env` file and set the value to be your memcached servers in the following format: `HOST:PORT:WEIGHT,HOST2:PORT:WEIGHT`. You can specify as many servers as you want. Their usage split will be determined by the weight given to them. Here are some examples of what the `.env` file should look like:
```
# Set both the cache and session to use memcached
# Example of using two non-local memcached servers with an equal split
MEMCACHED_SERVERS=8.8.8.8:11211:50,8.8.4.4:11211:50
```
+
+### Redis
+
+To use Redis for caching and/or sessions open up your `.env` file and find the `CACHE_DRIVER` & `SESSION_DRIVER` variables. By default these are both set to `file`. Change these variables to `redis`. You will need to add a variable to specify your Redis servers. To do this add a variable named `REDIS_SERVERS` to the `.env` file and set the value to point at your Redis servers in the following format: `HOST:PORT:DATABASE,HOST2:PORT:DATABASE`. The default values for each host are `127.0.0.1:6379:0`. You can list as many servers as you like.
+
+To specify if you would like to cluster you Redis servers create a `REDIS_CLUSTER` key in the `.env` file and set it to `true`. This option, if set to true, will instruct the built-in Redis client to perform client-side sharding across your Redis nodes, allowing them to pool together for a large amount of RAM. This disadvantage of this it that it does not allow for fail-over.
+
+Here's an example of setting the Redis configuration:
+
+```
+# Set both the cache and session to use Redis
+CACHE_DRIVER=redis
+SESSION_DRIVER=redis
+
+# Example of using a single local Redis server
+REDIS_SERVERS=127.0.0.1:6379:0
+
+# Example of using two non-local Redis servers clustered together
+REDIS_SERVERS=8.8.8.8:6379:0,8.8.4.4:6379:0
+REDIS_CLUSTER=true
+```
font-weight: 300;
}
.icon svg {
- fill: #FFF;
- height: 18px;
- margin-top: 3px;
+ fill: #FFF
}
}
a {
display: inline-block;
padding: $-m;
- line-height: 1.9;
+ line-height: 1.9
}
span.icon {
- font-size: 18px;
+ font-size: 16px;
vertical-align: top;
padding-right: 4px;
display: inline-block;
position: relative;
top: 2px;
+ svg {
+ height: 18px;
+ margin-top: 3px;
+ }
}
}
.docs-content {
padding-bottom: $-xxl;
.edit-link {
- padding: $-xl 0;
+ margin-top: $-xxl;
+ display: inline-block;
+ padding: $-s $-xl;
+ border-radius: 24px;
z-index: 1;
position: relative;
+ border: 2px solid #DDD;
+ color: #888;
+ transition: all ease-in-out 120ms;
.icon {
width: 24px;
vertical-align: 4px;
}
svg {
+ transition: all ease-in-out 120ms;
+ fill: #888;
height: 18px;
width: 20px;
}
}
+ .edit-link:hover {
+ border-color: $primary;
+ color: $primary;
+ text-decoration: none;
+ svg {
+ fill: $primary;
+ }
+ }
}
.sidebar, .docs-index {
#content {
min-height: 70vh;
}
-
<div class="container">
- <div class="col-sm-2 sidebar">
- @include('docs/admin-sidebar')
- </div>
+ <div class="row">
+ <div class="col-sm-2 sidebar">
+ @include('docs/admin-sidebar')
+ </div>
- <div class="col-sm-8 col-sm-offset-1 docs-content">
- <a class="float right edit-link" target="_blank"
- href="https://github.com/BookStackApp/website/blob/master/resources/docs/{{ $type }}/{{ $page }}.md">
- <span class="icon small">{!! icon('edit') !!}</span>
- Edit page
- </a>
- {!! $html !!}
+ <div class="col-sm-8 col-sm-offset-1 docs-content">
+ {!! $html !!}
+
+ <div class="text-center">
+ <a class="edit-link" target="_blank"
+ href="https://github.com/BookStackApp/website/blob/master/resources/docs/{{ $type }}/{{ $page }}.md">
+ <span class="icon small">{!! icon('edit') !!}</span>
+ Edit this Page
+ </a>
+ </div>
+
+ </div>
</div>
</div>
<div class="container">
- <div class="col-sm-2 sidebar">
- @include('docs/user-sidebar')
- </div>
+ <div class="row">
+ <div class="col-sm-2 sidebar">
+ @include('docs/user-sidebar')
+ </div>
- <div class="col-sm-8 col-sm-offset-1 docs-content">
- <a class="float right edit-link" target="_blank"
- href="https://github.com/BookStackApp/website/blob/master/resources/docs/{{ $type }}/{{ $page }}.md">
- <span class="icon small">{!! icon('edit') !!}</span>
- Edit this page
- </a>
- {!! $html !!}
+ <div class="col-sm-8 col-sm-offset-1 docs-content">
+ {!! $html !!}
+
+ <div class="text-center">
+ <a class="edit-link" target="_blank"
+ href="https://github.com/BookStackApp/website/blob/master/resources/docs/{{ $type }}/{{ $page }}.md">
+ <span class="icon small">{!! icon('edit') !!}</span>
+ Edit this Page
+ </a>
+ </div>
+
+ </div>
</div>
</div>