fix: cache should be stored in a hour (#13)

* fix ttl expire

* Update .env.schema

* update readme
このコミットが含まれているのは:
Okita Alter 2022-12-25 02:45:19 +07:00 committed by GitHub
コミット c316ae5f46
この署名に対応する既知のキーがデータベースに存在しません
GPGキーID: 4AEE18F83AFDEB23
3個のファイルの変更5行の追加5行の削除

ファイルの表示

@ -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;