Skip to content

Commit

Permalink
perf: cache endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
winstxnhdw authored Jan 16, 2024
1 parent a501582 commit 4e92ba7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions Caddyfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
{
order cache before rewrite
cache
}

:{$APP_PORT} {
cache {
allowed_http_verbs POST
ttl 24h
}

handle_path /api/* {
reverse_proxy http://localhost:{$SERVER_PORT} {
transport http {
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.build
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ RUN poetry install --without=dev --no-root

FROM caddy:builder-alpine as caddy-builder

RUN xcaddy build
RUN xcaddy build --with github.com/darkweak/souin/plugins/caddy


FROM python:3.11.7-slim
Expand Down

0 comments on commit 4e92ba7

Please sign in to comment.