apollographql / apollographql/datasource-rest
[Feature Request]: Store JSON responses as objects in the cache instead of stringifying them
- Dominant language
- TypeScript
- Stars
- 48
- Forks
- 21
- PR merge metrics
- No merged PRs in 30d
Description
## Summary
I would like to request a feature enhancement that allows JSON responses to be stored as objects in the cache, instead of stringifying them.
### Problem
Currently, when caching JSON responses, the package stores them as strings. For my use case, I handle large JSON bodies that can exceed 10MB in size. Every time I retrieve a response from the cache, I noticed that the response times were extremely slow for just reading data from an in memory cache. Parsing JSON objects depending on the size can be introducing a pretty significant performance issue that can be avoided.
### Proposed Solution
Allow developers to provide an override method that handles storing the response object in cache
Contributor guide
No contributing guide indexed for this repository
Research direction
The issue does not name files, tests, or an entry point. Start by tracing how JSON responses are serialized and restored in the cache, then determine where a storage override belongs. Done should include object-preserving cache behavior for large JSON responses and coverage for the relevant retrieval path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100