scottsweb / wp-instagram-widget

❌ A WordPress widget for showing your latest Instagram photos.
115 stars 62 forks source link

Save latest scrape results to a DB #90

Closed NazarkinRoman closed 4 years ago

NazarkinRoman commented 6 years ago

In addition to issue #89 would be great to store last scrape result as a option instead of transient. Since transients have an ability to expire and sometimes gets cleaned by third-party plugins, we can ran into the situation when old transient is already deleted, but new data is not scraped yet(instagram unavailable or some JSON changes which break scraping functionality).

In that case site visitors will see error message which is not good practice. Instead, we can show cached results from the last successful scrape until we'll be able to scrape data again.

The other side is in that we should somehow notify site admin about errors. This can be done through dashboard notices.

Let me know if it is a good idea or not and then I can start implementing this and send PR.

scottsweb commented 6 years ago

I would be interested in exploring this. Possibly in using the cache API too so the results are stored in memory on hosts that support that. There won't be much benefit gained by switch to a straight option, it would probably require an update to be carried out by cron in the background if possible.

Also worth looking at the link in https://github.com/scottsweb/wp-instagram-widget/issues/39 as this will fix transients to work how you describe.

I would probably avoid dashboard notices for alerts as they are not very well implemented as things stand. Some kind of admin only feedback would be neat though.

feastdesignco commented 6 years ago

Any progress on this @scottsweb ?

I'd love to get this implemented. Can't contribute to the code but would be happy to pay for the time to get this implemented. Couldn't find your contact information anywhere.

scottsweb commented 6 years ago

None yet, it will be the next thing I work on though

scottsweb commented 4 years ago

This project is being archived (background in #118). Instagram filed a trademark complaint which saw the plugin removed from WordPress.org and then proceeded to block it from accessing instagram.com. All issues are being closed and it will soon be in a read only state.