aws / aws/aws-appsync-community
[Feature Request] Per-function caching
- Dominant language
- HTML
- Stars
- 507
- Forks
- 37
- PR merge metrics
- No merged PRs in 30d
Description
I would love to see the ability to cache the result of an individual function in addition to an entire resolver.
For example, think of an app where you have 50 different endpoints. All of them do different things, but they all use the user's settings to determine what to do, like the user's chosen language or whether they have admin permissions. Hitting the data source for these same settings on every single query puts extra load on the database and adds latency.
Instead, you’d configure a function to grab these settings with `ctx.identity` as the cache key with a timeout of say 10 min. Then evict it on any request that changes a users settings or permission level.
Contributor guide
Research direction
Start by reviewing AWS AppSync's resolver and function caching capabilities, with the issue's per-function cache-key, timeout, and eviction requirements as the checklist. Determine whether the requested behavior is supported and what design decisions or documentation are needed; done means the scope and implementation path are resolved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, graphql
- Domain
- api, backend, cloud, performance
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100