|
|
@ -106,6 +106,12 @@ Once you've done that, your config section should look like: |
|
|
|
} |
|
|
|
} |
|
|
|
``` |
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
You can also set an `expire` option to the number of seconds to expire keys in. |
|
|
|
|
|
|
|
This is off by default, but will constantly kick back expirations on each view |
|
|
|
|
|
|
|
or post. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
All of which are optional except `type` with very logical default values. |
|
|
|
|
|
|
|
|
|
|
|
### Postgres |
|
|
|
### Postgres |
|
|
|
|
|
|
|
|
|
|
|
To use postgres storage you must install the `pg` package in npm |
|
|
|
To use postgres storage you must install the `pg` package in npm |
|
|
@ -123,11 +129,10 @@ Once you've done that, your config section should look like: |
|
|
|
|
|
|
|
|
|
|
|
You can also just set the environment variable for `DATABASE_URL` to your database connection url. |
|
|
|
You can also just set the environment variable for `DATABASE_URL` to your database connection url. |
|
|
|
|
|
|
|
|
|
|
|
Lastly, you will have to manually add a table to your postgres database: |
|
|
|
You will have to manually add a table to your postgres database: |
|
|
|
|
|
|
|
|
|
|
|
`create table entries (id serial primary key, key varchar(255) not null, value text not null, expiration int, unique(key));` |
|
|
|
`create table entries (id serial primary key, key varchar(255) not null, value text not null, expiration int, unique(key));` |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
You can also set an `expire` option to the number of seconds to expire keys in. |
|
|
|
You can also set an `expire` option to the number of seconds to expire keys in. |
|
|
|
This is off by default, but will constantly kick back expirations on each view |
|
|
|
This is off by default, but will constantly kick back expirations on each view |
|
|
|
or post. |
|
|
|
or post. |
|
|
|