Skip to content

In SSR mode the HTTP POST cache should consider cases when the body is an object #54956

@dchicurel

Description

@dchicurel

Which @angular/* package(s) are the source of the bug?

core

Is this a regression?

No

Description

This is a similar issue as the described and solved in #54377 . The problem is that usually, we can provide an object as the body and this should be normal as the body will still be serialized later in the http POST method.

image

I understand that this could have performance implications while serializing the body each time we want to obtain the cache key so not sure if this would be accepted to add although it should be desired.

Not sure if it would be a good solution, but could we maybe add another option to the POST requests to provide a cache key function or extra string?

Please provide a link to a minimal reproduction of the bug

No response

Please provide the exception or error you saw

No exception, just that two different POST requests with different body params get the same cache key.

Please provide the environment you discovered this bug in (run ng version)

Angular CLI: 17.2.3
Node: 20.11.0

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions