Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Invalidation Does Not Work with Filtered GetCollection Requests Using fields[] Apiplatform #544

Closed
g-ra opened this issue Aug 14, 2024 · 1 comment

Comments

@g-ra
Copy link

g-ra commented Aug 14, 2024

Repository https://github.com/g-ra/ISSUE-944-apiplatform/tree/issue-2
Video Demonstration: https://www.loom.com/share/b512959e7a944f6b8bf3bacdf20ac32d

Description:

While testing the Souin caching mechanism, we've encountered an issue where cache invalidation does not work correctly when using filtered GetCollection requests with fields[] parameters. Specifically:

GetCollection requests work correctly.
GetID requests also work correctly.
However, GetCollection requests with fields[] filters trigger invalidation but not deleted in souin.

mode bypass

Steps to Reproduce:

Perform a GetCollection request:

Example: GET http://localhost:81/customers?page=1
Result: Works correctly and cache invalidation occurs as expected.
Perform a GetID request:

Example: GET http://localhost:81/customers/1
Result: Works correctly and cache invalidation occurs as expected.
Perform a GetCollection request with filters:

Example: GET http://localhost:81/customers?page=1&fields[]=name
Result: Cache invalidation does not occur as expected.
Compare with a GetCollection request using query parameters:

Example: GET http://localhost:81/customers?page=1&firstname=John
Result: Works correctly and cache invalidation occurs as expected.

Expected Behavior:

Cache invalidation should occur for all GetCollection requests, including those with fields[] parameters, just as it does for other filtered and unfiltered requests.

@darkweak
Copy link
Owner

Resolved by #545

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants