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

Only refresh My Store stats data when a new order is placed for the site. #6618

Open
5 tasks
JorgeMucientes opened this issue May 27, 2022 · 1 comment
Open
5 tasks
Assignees
Labels
type: enhancement A request for an enhancement.

Comments

@JorgeMucientes
Copy link
Contributor

JorgeMucientes commented May 27, 2022

wc-analytics endpoint is one of the slowest endpoints in the app, and is one that we hit a lot. We fetch site stats and top performers every time we open My Store tab and when we change between tabs.

To reduce the number of requests done to the wc-analytics endpoint, while keeping the data fresh, we will:

  • Migrate existing top performer products cache to use Room so we can apply an observable approach: PR
  • Invalidate top performer products cached data whenever a new order is placed. Here and in Feature/6618 limit stats refresh #7411
  • Add an expiration policy to cached data to top performer products, and refresh it when expired: Feature/6618 limit stats refresh #7411
  • Add an expiration policy to cached data to stats, and refresh it when expired
  • Invalidate Store stats cached data whenever a new order is placed.

Visitor stats are not included as part of this caching/invalidating policy. Visitor stats should always be refreshed.

More details here: p91TBi-8yY-p2 and here p91TBi-8V6-p2

@JorgeMucientes JorgeMucientes added the type: enhancement A request for an enhancement. label May 27, 2022
@peril-woocommerce
Copy link

Fails
🚫 Please add a feature label to this issue. e.g. 'feature: stats'

Generated by 🚫 dangerJS

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

No branches or pull requests

1 participant