* fix ttl expire * Update .env.schema * update readme
このコミットが含まれているのは:
コミット
c316ae5f46
|
@ -10,5 +10,5 @@ RAILWAY=sinkaroid
|
|||
PORT=3000
|
||||
REDIS_URL=redis://default:somenicepassword@redis-666.c10.us-east-6-6.ec666.cloud.redislabs.com:1337
|
||||
|
||||
# ttl for cache in a day
|
||||
EXPIRE_CACHE=1
|
||||
# ttl for cache in a hour
|
||||
EXPIRE_CACHE=1
|
||||
|
|
|
@ -80,7 +80,7 @@ Rename `.env.schema` to `.env` and fill the value with your own.
|
|||
```bash
|
||||
PORT=3000 ## default port
|
||||
REDIS_URL=redis://default:somenicepassword@someredishost:1337 ## the database url
|
||||
EXPIRE_CACHE=1 ## should expired in a day
|
||||
EXPIRE_CACHE=1 ## a hour
|
||||
```
|
||||
|
||||
### Docker
|
||||
|
@ -242,4 +242,4 @@ Seamlessly integrate with the languages you love, simplified the usage, and inte
|
|||
## Legal
|
||||
This tool can be freely copied, modified, altered, distributed without any attribution whatsoever. However, if you feel
|
||||
like this tool deserves an attribution, mention it. It won't hurt anybody.
|
||||
> Licence: WTF.
|
||||
> Licence: WTF.
|
||||
|
|
|
@ -6,7 +6,7 @@ dotenv.config();
|
|||
const keyv = new Keyv(process.env.REDIS_URL);
|
||||
|
||||
keyv.on("error", err => console.log("Connection Error", err));
|
||||
const ttl = 1000 * 60 * 60 * 24 * Number(process.env.EXPIRE_CACHE);
|
||||
const ttl = 1000 * 60 * 60 * Number(process.env.EXPIRE_CACHE);
|
||||
|
||||
class JandaPress {
|
||||
url: string;
|
||||
|
|
読み込み中…
新しいイシューから参照