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

SIT-2708: Should curation result posts be saved in a site option? #153

Closed
barryceelen opened this issue Nov 9, 2021 · 4 comments · Fixed by #298 or #305
Closed

SIT-2708: Should curation result posts be saved in a site option? #153

barryceelen opened this issue Nov 9, 2021 · 4 comments · Fixed by #298 or #305
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@barryceelen
Copy link
Contributor

It seems the curation request result for each widget, which I suppose is the list of posts Sophi returns for a widget, is stored in an option:

https://github.com/globeandmail/sophi-for-wordpress/blob/develop/includes/classes/SiteAutomation/Request.php#L82

I'm wondering how big that response is, and if it should be stored in an option at all. I'm thinking it is generally not good form to use the options table for this type of data, which could also lead to issues with options caching. It might be better to store that data elsewhere, eg. in a custom post type.

@barryceelen barryceelen added the enhancement New feature or request label Nov 9, 2021
@jeffpaul
Copy link
Contributor

jeffpaul commented Nov 9, 2021

Flagging for @felipeelia to review / consider best approach if a change is needed.

@felipeelia
Copy link

I think @Rahmon will have a better opinion on this one but yeah, it seems that can result in a bunch of options being created (our best practices guide mentions a total limit of 500.) Changing that can be a huge lift though. So, short term I'd change those options to not autoload (that should be done asap) and then migrate to a CPT.

@jeffpaul jeffpaul added this to the 1.1.0 milestone Nov 13, 2021
@barryceelen
Copy link
Contributor Author

Relatedly, It also looks like the plugin never purges the sophi_site_automation_data_... options. If you stop using a particular widget, there is no functionality that removes its related options.

@jeffpaul jeffpaul added the help wanted Extra attention is needed label Nov 25, 2021
@jeffpaul jeffpaul modified the milestones: 1.0.10, 1.1.0 Feb 28, 2022
@jeffpaul
Copy link
Contributor

@jeffpaul jeffpaul modified the milestones: 1.1.0, 1.0.15 Mar 14, 2022
@jeffpaul jeffpaul removed the help wanted Extra attention is needed label Mar 14, 2022
@jeffpaul jeffpaul changed the title Should curation result posts be saved in a site option? SIT-2708: Should curation result posts be saved in a site option? May 13, 2022
@jeffpaul jeffpaul linked a pull request May 31, 2022 that will close this issue
6 tasks
@jeffpaul jeffpaul modified the milestones: 1.2.0, 1.1.4 May 31, 2022
@jeffpaul jeffpaul linked a pull request Jun 22, 2022 that will close this issue
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
4 participants