Skip to content

[Doc FR]: getCacheKey -> serverCacheKey from caching.md #138

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 32 commits into from
Sep 26, 2017
Merged
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
cbad2d5
Add french directory
MachinisteWeb May 5, 2017
7eb4741
Change all `Webpack` occurences to `webpack`
MachinisteWeb May 5, 2017
5162352
Remove extra `\` to avoid Gitbook to « parse » `{{` and `{{{` leading…
MachinisteWeb May 5, 2017
35465e7
Add all still in translation page with this mention to invite reader …
MachinisteWeb May 5, 2017
eaf857d
Merge remote-tracking branch 'upstream/master'
MachinisteWeb May 8, 2017
9d32172
Add routing.md translation
MachinisteWeb May 8, 2017
764127d
Merge remote-tracking branch 'upstream/master'
MachinisteWeb May 18, 2017
4c3fd20
universal.md et structure.md fr translation
MachinisteWeb May 18, 2017
91b6882
Change bus for canal like in vuejs.org official fr documentation
MachinisteWeb May 19, 2017
974483f
Merge remote-tracking branch 'upstream/master'
MachinisteWeb May 23, 2017
b402b79
New fr translation about `mustache` into basic.md
MachinisteWeb May 23, 2017
77ff233
Add data.md to list of translated files
MachinisteWeb May 27, 2017
eac78f8
Ad new translations
MachinisteWeb May 31, 2017
bb58598
Merge remote-tracking branch 'upstream/master'
MachinisteWeb Jun 2, 2017
a5a11f3
Update website
MachinisteWeb Jun 2, 2017
1198aec
Merge remote-tracking branch 'upstream/master'
MachinisteWeb Jun 5, 2017
5b0d88c
Translation of hydration.md, bundle-renderer.md, build-config.md
MachinisteWeb Jun 5, 2017
fc23dad
Amend all en modification from this branch
MachinisteWeb Jun 5, 2017
79da6f0
Re-insert no capital to webpack term.
MachinisteWeb Jun 5, 2017
28831b7
Merge remote-tracking branch 'upstream/master'
MachinisteWeb Jun 12, 2017
538a89c
Add tick to basic.md's <meta> occurence
MachinisteWeb Jun 12, 2017
86b3e00
Merge remote-tracking branch 'upstream/master'
MachinisteWeb Jul 13, 2017
fbf453b
`une URL` become `un URL`
MachinisteWeb Jul 17, 2017
fd449f5
Merge remote-tracking branch 'upstream/master'
MachinisteWeb Jul 22, 2017
f5c15ad
French SSR translation done.
MachinisteWeb Jul 22, 2017
a284f52
Merge remote-tracking branch 'upstream/master'
MachinisteWeb Aug 24, 2017
26bbafe
Change all ">=" to "+" for FR translation
MachinisteWeb Aug 24, 2017
1a6ebab
Merge remote-tracking branch 'upstream/master'
MachinisteWeb Sep 12, 2017
ce60df6
Remove unuseful `,` an `(En)`
MachinisteWeb Sep 12, 2017
1d77dda
Nuxt with https link
MachinisteWeb Sep 12, 2017
8d49254
Merge remote-tracking branch 'upstream/master'
MachinisteWeb Sep 26, 2017
a49ccb3
getCacheKey -> serverCacheKey in caching.md
MachinisteWeb Sep 26, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion fr/caching.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export default {

Notez que ce composant pouvant être mis en cache **doit aussi définir une option `name` unique**. Avec un nom unique, la clé de mise en cache est effective par composant : vous n'avez donc pas besoin de vous préoccuper de deux composants qui retourneraient la même clé.

La clé retournée par `serverCacheKey` devrait contenir suffisamment d'informations pour représenter tous les résultats de rendu. L'exemple ci-dessus est une bonne implémentation si le résultat du rendu est uniquement déterminé par `props.item.id`. Cependant, si un élément avec le même identifiant change à chaque fois, ou si son rendu est lié au changement d'une autre prop, alors vous devez modifier votre implémentation `getCacheKey` pour prendre en compte ces variables.
La clé retournée par `serverCacheKey` devrait contenir suffisamment d'informations pour représenter tous les résultats de rendu. L'exemple ci-dessus est une bonne implémentation si le résultat du rendu est uniquement déterminé par `props.item.id`. Cependant, si un élément avec le même identifiant change à chaque fois, ou si son rendu est lié au changement d'une autre prop, alors vous devez modifier votre implémentation `serverCacheKey` pour prendre en compte ces variables.

Retourner une constante va mener le composant à toujours être en cache, ce qui peut être une bonne chose pour les composants statiques.

Expand Down