Skip to content

Commit

Permalink
feat(cache): decrease the default TTL of dynamic contents to 1s
Browse files Browse the repository at this point in the history
  • Loading branch information
RoyXiang committed Nov 17, 2022
1 parent 614a3fc commit 69b5001
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ env CGO_ENABLED=0 go install -trimpath -ldflags="-s -w" github.com/RoyXiang/plex
* Or, you can set it to [the official one](https://plaxt.astandke.com/)
- `PLEX_TOKEN` (Optional, if you need it, see [here](https://support.plex.tv/articles/204059436-finding-an-authentication-token-x-plex-token/))
- `STATIC_CACHE_TTL` (Optional, default: `1h`, which controls the cache TTL of static files)
- `DYNAMIC_CACHE_TTL` (Optional, default: `5s`, which controls the cache TTL of dynamic requests)
- `DYNAMIC_CACHE_TTL` (Optional, default: `1s`, which controls the cache TTL of dynamic requests)
- `REDIRECT_WEB_APP` (Optional, default: `true`)
- `DISABLE_TRANSCODE` (Optional, default: `true`)
- `NO_REQUEST_LOGS` (Optional, default: `false`)
Expand Down
2 changes: 1 addition & 1 deletion handler/plex.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func NewPlexClient(config PlexConfig) *PlexClient {
}
dynamicCacheTtl, err := time.ParseDuration(config.DynamicCacheTtl)
if err != nil {
dynamicCacheTtl = time.Second * 5
dynamicCacheTtl = time.Second
}

var redirectWebApp, disableTranscode, noRequestLogs bool
Expand Down

0 comments on commit 69b5001

Please sign in to comment.