Skip to content

Commit 0c6a05f

Browse files
Bump to 7.1.5 and reduce aggressive root.tsx caching (#172)
* Bump to 7.1.5 and reduce aggressive root.tsx caching * Remove `deploy` cahce
1 parent a96c007 commit 0c6a05f

File tree

4 files changed

+27
-32
lines changed

4 files changed

+27
-32
lines changed

app/http.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,6 @@ export const CACHE_CONTROL = {
77
// github
88
doc: "public, max-age=300, stale-while-revalidate=604800",
99

10-
// cache "forever", our deploy scripts mark the entire cache as stale so this
11-
// will be expired between deploys, good for pages that don't rely on any
12-
// loader data, just the source code components
13-
deploy: "public, max-age=31536000",
14-
1510
// don't cache at all
1611
none: "no-store, no-cache, must-revalidate, max-age=0",
1712
};

app/root.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export async function loader({ request }: LoaderFunctionArgs) {
3838
export function headers() {
3939
return {
4040
// default all caching to deployments
41-
"Cache-Control": CACHE_CONTROL.deploy,
41+
"Cache-Control": CACHE_CONTROL.doc,
4242
Vary: "Cookie",
4343
};
4444
}

package-lock.json

Lines changed: 22 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
"dependencies": {
2323
"@docsearch/css": "^3.8.3",
2424
"@docsearch/react": "^3.8.3",
25-
"@react-router/express": "7.1.3",
26-
"@react-router/node": "7.1.3",
25+
"@react-router/express": "^7.1.5",
26+
"@react-router/node": "^7.1.5",
2727
"@types/express": "^5.0.0",
2828
"cheerio": "^1.0.0-rc.12",
2929
"classnames": "^2.3.2",
@@ -44,7 +44,7 @@
4444
"parse-numeric-range": "^1.3.0",
4545
"react": "^19.0.0",
4646
"react-dom": "^19.0.0",
47-
"react-router": "7.1.3",
47+
"react-router": "^7.1.5",
4848
"rehype-autolink-headings": "^7.1.0",
4949
"rehype-slug": "^6.0.0",
5050
"rehype-stringify": "^10.0.1",
@@ -61,7 +61,7 @@
6161
"unist-util-visit": "^5.0.0"
6262
},
6363
"devDependencies": {
64-
"@react-router/dev": "7.1.3",
64+
"@react-router/dev": "^7.1.5",
6565
"@testing-library/jest-dom": "^5.16.5",
6666
"@types/eslint": "^8.56.6",
6767
"@types/express-serve-static-core": "^5.0.6",

0 commit comments

Comments
 (0)