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

Improve API podcast episodes controller caching and fetching #5772

Merged
merged 3 commits into from
Jan 27, 2020
Merged

Improve API podcast episodes controller caching and fetching #5772

merged 3 commits into from
Jan 27, 2020

Conversation

rhymes
Copy link
Contributor

@rhymes rhymes commented Jan 27, 2020

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update

Description

Similar to #5709 we're removing server side caching, adding edge caching and busting and some tests

I haven't added the usual .purge call because it's already present, though I'm not sure we need to call it twice, but I'd rather keep things as is in the cache buster for now and then go over it with a fine tooth comb:

https://github.com/thepracticaldev/dev.to/blob/743ac13cec56f50694b00c3874b9d5ce009ccdc6/app/labor/cache_buster.rb#L146-L159

Related Tickets & Documents

#5709

@pr-triage pr-triage bot added the PR: unreviewed bot applied label for PR's with no review label Jan 27, 2020
Copy link
Contributor

@vaidehijoshi vaidehijoshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice! and thanks for improving the tests here, too :)

respond_to :json

before_action :cors_preflight_check
after_action :cors_set_access_control_headers

before_action :set_cache_control_headers, only: %i[index]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥🔥🔥

@pr-triage pr-triage bot added PR: reviewed-approved bot applied label for PR's where reviewer approves changes and removed PR: unreviewed bot applied label for PR's with no review labels Jan 27, 2020
Copy link
Contributor

@benhalpern benhalpern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me, and is technically the right choice here all in all, but as you alluded to, we need further discussions.

Basically all my reactions here are "this works, but let's get on the same page before taking this too far" so let's find some time next week to discuss this alongside other folks from the team.

@benhalpern benhalpern merged commit 5444c53 into forem:master Jan 27, 2020
@pr-triage pr-triage bot added PR: merged bot applied label for PR's that are merged and removed PR: reviewed-approved bot applied label for PR's where reviewer approves changes labels Jan 27, 2020
@rhymes rhymes deleted the rhymes/improve-api-podcast_episodes-controller branch January 28, 2020 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: merged bot applied label for PR's that are merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants