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

apply wildcard (*) cache busting #21

Closed
thescientist13 opened this issue Dec 18, 2022 · 0 comments · Fixed by #22 or #24
Closed

apply wildcard (*) cache busting #21

thescientist13 opened this issue Dec 18, 2022 · 0 comments · Fixed by #22 or #24
Assignees
Labels
feature New feature or request Webhooks

Comments

@thescientist13
Copy link
Contributor

Not sure if it has been the cause of certain bugs / issues we may be seeing in regards to inconsistent data on the frontend side of the project, but I wonder if the issue is how we are submitting our cache invalidation?

  const params = {
    DistributionId: CONFIG.distributionId,
    InvalidationBatch: {
      CallerReference: new Date().getTime(),
      Paths: {
        Quantity: 1,
        Items: [
          `/api/v2/${entity}s`
        ]
      }
    }
  };

I've always used a wildcard in these types of scenarios, so I'm thinking the code should be updated accordingly

  const params = {
    DistributionId: CONFIG.distributionId,
    InvalidationBatch: {
      CallerReference: new Date().getTime(),
      Paths: {
        Quantity: 1,
        Items: [
          `/api/v2/${entity}s/*`
        ]
      }
    }
  };
@thescientist13 thescientist13 added the feature New feature or request label Dec 18, 2022
@thescientist13 thescientist13 self-assigned this Dec 18, 2022
@thescientist13 thescientist13 moved this to In Progress in General Activities Dec 18, 2022
@thescientist13 thescientist13 moved this from In Progress to In Review in General Activities Dec 18, 2022
Repository owner moved this from In Review to Done in General Activities Dec 18, 2022
@thescientist13 thescientist13 linked a pull request Jan 3, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request Webhooks
Projects
No open projects
1 participant