-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplugin.zmodel
More file actions
42 lines (39 loc) · 981 Bytes
/
plugin.zmodel
File metadata and controls
42 lines (39 loc) · 981 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// Next.js Cache Plugin - カスタム属性定義
// ZenStack v3 用の拡張スキーマ
/**
* キャッシュ除外属性
* このモデルへのクエリ結果をキャッシュしない
*
* @example
* model Session {
* id String @id
* @@cache.exclude()
* }
*/
attribute @@cache.exclude()
/**
* キャッシュライフタイム属性
* キャッシュの有効期間を設定
*
* @param life - 'seconds' | 'minutes' | 'hours' | 'days' | 'weeks' | 'max'
*
* @example
* model Post {
* id String @id
* @@cache.life('minutes')
* }
*/
attribute @@cache.life(_ life: String @@@completionHint(["'seconds'", "'minutes'", "'hours'", "'days'", "'weeks'", "'max'"]))
/**
* カスタムキャッシュタグ属性
* デフォルトのタグに加えてカスタムタグを設定
*
* @param tags - タグの配列
*
* @example
* model Post {
* id String @id
* @@cache.tags(['content', 'blog'])
* }
*/
attribute @@cache.tags(_ tags: String[])