···309309});
310310```
311311312312+### Flexible Key Generation
313313+314314+In some cases, you may want to create a pattern for your key generation. For instance, you may want
315315+to say "create a special key for every type ending in `'Node'`. In such a case we recommend creating
316316+a small JS `Proxy` to take care of key generation for you and making the keys functional.
317317+318318+```js
319319+cacheExchange({
320320+ keys: new Proxy(
321321+ {
322322+ Image: () => null,
323323+ },
324324+ {
325325+ get(target, prop, receiver) {
326326+ if (prop.endsWith('Node')) {
327327+ return data => data.uid;
328328+ }
329329+ const fallback = data => data.uuid;
330330+ return target[prop] || fallback;
331331+ },
332332+ }
333333+ ),
334334+});
335335+```
336336+337337+In the above example, we dynamically change the key generator depending on the typename. When
338338+a typename ends in `'Node'`, we return a key generator that uses the `uid` field. We still fall back
339339+to an object of manual key generation functions however. Lastly though, when a type doesn't have
340340+a predefined key generator, we change the default behavior from using `id` and `_id` fields to using
341341+`uuid` fields.
342342+312343## Non-Automatic Relations and Updates
313344314345While _Graphcache_ is able to store and update our entities in an in-memory relational data