-
-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Description
Enhancement: Store Deserialized HttpResponse for Improved Performance
To enhance the performance of the HTTP cache library, consider adding the capability to store the deserialized version of the HttpResponse. This would help developers in avoiding repeated deserialization after retrieving from the cache.
-
Current Behavior:
- When retrieving a cached
HttpResponse, developers need to deserialize the response every time. - This leads to repetitive and unnecessary processing, especially for frequently accessed responses.
- When retrieving a cached
-
Proposed Enhancement:
- Alongside the serialized response, store a deserialized version.
- When the cache is accessed, provide an option to retrieve the already deserialized
HttpResponse.
Benefits:
- Performance: Faster retrieval times for cached responses, especially for applications where deserialization time is significant.
- Ease of Use: Developers can bypass the deserialization step, simplifying their code.
Considerations:
- Memory Usage: Storing deserialized versions might increase memory usage. This needs to be benchmarked and considered during implementation.
- Cache Invalidation: Ensure that both serialized and deserialized versions are invalidated concurrently to avoid data mismatches.
Let me know what you think?
bbigras
Metadata
Metadata
Assignees
Labels
No labels