effector / effector/farfetched

Add a recipe about custom factories for specific needs

Open
#350 14 comments 0 reactions 0 assignees View on GitHub
scope:core type:documentation
Dominant language
TypeScript
Stars
221
Forks
36
PR merge metrics
No merged PRs in 30d

Description

Precondition: [docs](https://farfetched.pages.dev/recipes/cache.html#hashing-algorithm)
```
So, the key is a hash of the following data:
- SID of the Query
- params of the particular call of the Query
- current values of all external Stores that affect Query
To get short and unique key, we stringify all data, concatenate it and then hash it with SHA-1.
```

Usually we have a lots of queries which is tied to user session. Common usecases:
- active user organization (in cases where app have two-layer auth).
- current role(permissions) of user (backend can in runtime change it)

But there is no api to provide this knowledge for cache (it usually does not passed in params but backend takes it from session tokens)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.