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

Compatibility with SpinupWP cache purging (indiviual URLs) #6033

Closed
2 of 6 tasks
DahmaniAdame opened this issue Jul 7, 2023 · 4 comments · Fixed by #6100
Closed
2 of 6 tasks

Compatibility with SpinupWP cache purging (indiviual URLs) #6033

DahmaniAdame opened this issue Jul 7, 2023 · 4 comments · Fixed by #6100
Assignees
Labels
3rd party compatibility Issues related to 3rd party compatibility like theme, plugin or hosting effort: [S] 1-2 days of estimated development time module: cache needs: environment priority: low Issues that can wait type: enhancement Improvements that slightly enhance existing functionality and are fast to implement
Milestone

Comments

@DahmaniAdame
Copy link
Contributor

Before submitting an issue please check that you’ve completed the following steps:

  • Made sure you’re on the latest version
  • Used the search feature to ensure that the bug hasn’t been reported before

Describe the bug
When using WP Rocket with SpinupWP, we disable our cache, and only sync full site cache purging:

'after_rocket_clean_domain' => 'purge_site',

Individual pages cache purge is not synced.

They do have a way to purge individual URLs are well:

function spinupwp_purge_url( $url ) {
    return spinupwp()->cache->purge_url( $url );
}

https://github.com/spinupwp/spinupwp-plugin/blob/62ae3ec7c53f602f80cd10c742fae6c361c790f4/functions.php#L38-L40C6

We should hook to this method whenever after_rocket_clean_post is triggered.

To Reproduce
Steps to reproduce the behavior:

  1. Use SpinupWP
  2. Purge an individual page
  3. See that the page is not purged from the server-side cache (it will still have Fastcgi-Cache: HIT response header returned)

Expected behavior
We should also sync individual pages cache when needed to ensure page content is always current.

Screenshots
N/A

Additional context
Ticket - https://secure.helpscout.net/conversation/2289462527/427935/

Backlog Grooming (for WP Media dev team use only)

  • Reproduce the problem
  • Identify the root cause
  • Scope a solution
  • Estimate the effort
@piotrbak piotrbak added type: enhancement Improvements that slightly enhance existing functionality and are fast to implement 3rd party compatibility Issues related to 3rd party compatibility like theme, plugin or hosting module: cache priority: medium Issues which are important, but no one will go out of business. labels Jul 24, 2023
@piotrbak
Copy link
Contributor

In this PR we need to make sure that specific URL of their cache are cleared when:

  1. Clicking on the Purge URL from the admin top bar
  2. When Used CSS for specific URL is generated
  3. The whole cache should not be cleared in the above scenarios

@piotrbak piotrbak added priority: low Issues that can wait needs: environment status: blocked Issue or PR is blocked by external factor. and removed priority: medium Issues which are important, but no one will go out of business. labels Jul 25, 2023
@Tabrisrp
Copy link
Contributor

Scope a solution ✅

In the SpinUpWP compatibility class, we can add methods to purge individual URLs, using the provided function by the host, with a check with function_exists() before using it.

We should use it for the following hooks:

  • after_rocket_clean_file
  • rocket_rucss_after_clearing_usedcss
  • rocket_rucss_complete_job_status
  • after_rocket_clean_term
  • rocket_after_clean_terms

Estimate the effort ✅

Effort S

@Tabrisrp Tabrisrp added the effort: [S] 1-2 days of estimated development time label Jul 31, 2023
@piotrbak
Copy link
Contributor

piotrbak commented Aug 1, 2023

Asked their Team to provide us with hosting plan

@piotrbak piotrbak removed the status: blocked Issue or PR is blocked by external factor. label Aug 6, 2023
@Tabrisrp Tabrisrp self-assigned this Aug 10, 2023
@BoyetDgte
Copy link

Asked their Team to provide us with hosting plan

Just want to clarify that SpinupWP doesn't host any servers. Thank you.

you will need to bring your own server for SpinupWP to connect to

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3rd party compatibility Issues related to 3rd party compatibility like theme, plugin or hosting effort: [S] 1-2 days of estimated development time module: cache needs: environment priority: low Issues that can wait type: enhancement Improvements that slightly enhance existing functionality and are fast to implement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants