If i request a resource that allows attribute filtering in the serialized response it is cached via the type / id combo but may be missing expected attributes for the later cache hit use cases. The cache hit should really not occur as it's really a different request.
We should generate cache keys based on the request type and id + params, e.g.
GET /api/projects/1 => "projects_c4ca4238a0b923820dcc509a6f75849b"GET /api/projects/1?cards=true => "projects_c41203d504194e2e6d818983d939ea74"
We will have to look at cache eviction (superagent-cache anyone?) here but at least we won't be returning possibly incorrect data depending on the order or request execution.
Linked to: https://github.com/zooniverse/Panoptes-Front-End/issues/2921 Slightly related to: https://github.com/zooniverse/json-api-client/pull/31 (it caches based on full request params)
If i request a resource that allows attribute filtering in the serialized response it is cached via the type / id combo but may be missing expected attributes for the later cache hit use cases. The cache hit should really not occur as it's really a different request.
We should generate cache keys based on the request type and id + params, e.g.
GET /api/projects/1 => "projects_c4ca4238a0b923820dcc509a6f75849b"
GET /api/projects/1?cards=true => "projects_c41203d504194e2e6d818983d939ea74"
We will have to look at cache eviction (superagent-cache anyone?) here but at least we won't be returning possibly incorrect data depending on the order or request execution.