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

Do we need a widget cache? #29

Open
bobbingwide opened this issue May 9, 2022 · 0 comments
Open

Do we need a widget cache? #29

bobbingwide opened this issue May 9, 2022 · 0 comments
Assignees
Labels
question Further information is requested

Comments

@bobbingwide
Copy link
Owner

bobbingwide commented May 9, 2022

In seriouslybonkers.com I used to use oik-widget cache to cache the contents of the sidebar widgets.
But there was a probem with caching of the Sequentially Biased widget since it supports pagination;
see bobbingwide/oik-widget-cache#3

oik-widget-cache has been deactivated for a while, but I can't remember why I did it.

Anyway, now that the widgets are implemented as blocks I'm wondering if there's a server performance benefit to caching a selection of the widgets? ie. Can some of the template parts be cached?
If so, how do we go about doing it?

Possible solution

  • Since we're already implementing override logic on template-parts we could implement a className attribute of "cache" on the template part. When this is detected then we'll look to see if there's a cached version.
  • The logic should also take into account the fact that the template-part is newer than the cached version.
  • If so, then it should use the new template part and re-cache the output.
@bobbingwide bobbingwide added the question Further information is requested label May 9, 2022
@bobbingwide bobbingwide self-assigned this May 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant