Skip to content

Commit

Permalink
docs: caching (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
mac-chaffee authored Jan 11, 2025
1 parent 1ddca57 commit 85c8781
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion posts/pgs.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,9 @@ ssh pgs.sh retain prefix -n 3

# set project to private to only you and matching public keys
ssh pgs.sh acl project-x --type pubkeys --acl sha256:xxx

# clear the http cache for a project
ssh pgs.sh cache project-x
```

# File denylist
Expand Down Expand Up @@ -290,7 +293,7 @@ We support custom redirects and rewrites via a special file `_redirects`.
/authors/c%C3%A9line /authors/about-c%C3%A9line
```

When no status is provided, we default to `301 Moved Permenantly`.
When no status is provided, we default to `301 Moved Permanently`.

```
# Redirect with a 301
Expand Down Expand Up @@ -487,6 +490,14 @@ ssh -L 1337:localhost:80 -N [email protected]

Then open your browser to http://localhost:1337

# Caching

To improve the page speed, pgs sites are cached for 10 minutes by default. This is controlled by the [`Cache-Control: max-age=600` header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control) which you can [override with a `_headers` file](#Headers).

There are two levels of caching: server-side and client-side. The server-side cache is automatically cleared every time you upload files, but client-side caches only expire when `max-age` seconds pass, or if you force-reload or clear your browser cache manually.

In case of issues, you can manually clear the server-side cache with `ssh pgs.sh cache project-name`.

# Does pages have a CDN or multi-region support?

At this point in time, we are able to serve content from a single VM. If this
Expand Down

0 comments on commit 85c8781

Please sign in to comment.