Next.js のキャッシュは「サーバー側」と「クライアント側」の2層に分かれる。
ブラウザ('use client')
└─ Router Cache
├─ 訪問済みページの RSC ペイロードをブラウザが保持する
├─ router.refresh() で破棄できる
└─ revalidatePath / revalidateTag では破棄できない
| # This is the configuration file for Ghostty. | |
| # | |
| # This template file has been automatically created at the following | |
| # path since Ghostty couldn't find any existing config files on your system: | |
| # | |
| # /Users/kousei_himeno/Library/Application Support/com.mitchellh.ghostty/config | |
| # | |
| # The template does not set any default options, since Ghostty ships | |
| # with sensible defaults for all options. Users should only need to set | |
| # options that they want to change from the default. |
| { | |
| "$schema": "http://json-schema.org/draft-07/schema#", | |
| "type": "object", | |
| "properties": | |
| { | |
| "global": | |
| { | |
| "$ref": "#/definitions/global" | |
| }, | |
| "profiles": |
| import { JSONSchema7 as JSONSchema } from "json-schema"; | |
| export type MapLike<K extends string, T> = { | |
| [key in K]: T; | |
| }; | |
| /** | |
| * @see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#serverVariableObject | |
| */ | |
| export interface ServerVariable { |
| const updateQueryStringParameter = (key: string, value: string): void => { | |
| const searchParams = new URLSearchParams(window.location.search); | |
| const params = {}; | |
| searchParams.forEach((v, k) => { | |
| params[k] = v; | |
| }); | |
| if (value === "") { | |
| delete params[key]; | |
| } else { | |
| params[key] = value; |
| /** | |
| * すでに生成されたインスタンスから、新しいインスタンスを生成する | |
| * https://stackoverflow.com/questions/41474986/how-to-clone-a-javascript-es6-class-instance | |
| * @param instance | |
| */ | |
| const cloneInstance = <T>(instance: T): T => Object.assign(Object.create(Object.getPrototypeOf(instance)), instance); |
| declare module namespace { | |
| export interface Comments { | |
| href: string; | |
| } | |
| export interface Commits { | |
| href: string; | |
| } |
| { | |
| "schemaVersion": 2, | |
| "mediaType": "application/vnd.docker.distribution.manifest.v2+json", | |
| "config": { | |
| "mediaType": "application/vnd.docker.container.image.v1+json", | |
| "size": 7753, | |
| "digest": "sha256:451b716593e5f4b35826c8f869950135b925e74d0ed0a40b7c794b8a54ce9b39" | |
| }, | |
| "layers": [ | |
| { |
| // https://github.com/sindresorhus/type-fest/blob/master/source/omit.d.ts | |
| type Omit<ObjectType, KeysType extends keyof ObjectType> = Pick<ObjectType, Exclude<keyof ObjectType, KeysType>>; | |
| interface A1 { | |
| type: "a1"; | |
| a1: string; | |
| } | |
| interface A2 extends Omit<A1, "type"> { | |
| type: "a2"; |