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

Api: Requests based on permissions with dynamic variables are being cached #22492

Open
joselcvarela opened this issue May 14, 2024 · 0 comments

Comments

@joselcvarela
Copy link
Member

Describe the Improvement

Responses based on permissions with dynamic variables are being cached.

To better understand what is the issue let's take the following example:

  • Cache is enabled
  • Collection "articles" with "show_date" which is a date time field
  • Public role can read articles from this collection where { filter: { show_date: { _lt: $NOW } } }

When asking items from article with Public role:

  • If cache is not populated, everything works as expected, i.e., the response will return all the "articles" where "show_date" is before now
  • If cache is already populated, we will still receive the same cached response. Although, because permission is based on time, we will not see "articles" that matches the rule "before now".

Because the permission is based on time, we believe that this kind of responses may not be cached as the response can be different at any point in time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🔖 Ready
Development

No branches or pull requests

1 participant