renao / sams-wordpress-plugin

WordPress plugin to integrate DVV (SAMS) data into our clubs website.
GNU General Public License v3.0
3 stars 2 forks source link

Q: Are requests to the API done everytime somebody opens the site or are they temporarily saved? #5

Closed pdeubel closed 2 years ago

pdeubel commented 3 years ago

According to this section of the SAMS XML Wiki entry the results from the API should be requested at about every five minutes and not every time somebody opens the site.

Is this done in this plugin? I tried reading a bit through your code but I am not familiar with PHP or Wordpress plugin development.

Thanks and nice project btw :)

renao commented 2 years ago

Hey @pdeubel,

it is requesting the results and tables on every request.

I read this spec, too - but honestly the page that's using this has way less than a visitor every five minutes, so I decided to keep it simple in the first place.

Could be a nice update tbh. Perhaps I will give it a try during this years hacktoberfest 👍

Thanks for the issue.

renao commented 2 years ago

Hey @pdeubel, I just added a simple caching algo right now.

I only tested it with our clubs' WordPress page, but I think it will work fine elsewhere.

Cheers @renao

pdeubel commented 2 years ago

Hey @renao Thanks a lot, looks good!