codemonauts / craft-instagram-feed

Craft CMS plugin to receive Instragram feed data as variable in templates
MIT License
27 stars 7 forks source link

Change cache period to custom value #33

Closed rowansentesy closed 2 years ago

rowansentesy commented 3 years ago

I have installed this plugin on a client site and they have requested the 6hr default cache duration to be decreased. Is there any way to expose this parameter and set it in the config? I could not see any documentation indicating that this is possible.

Thanks, Rowan

kringkaste commented 3 years ago

Hi Rowan, no at the moment you cannot overwrite the default cache time. We have to protect our proxies from being blocked. We will change this in the next release coming soon.

fleaz commented 2 years ago

Hey, after running the proxy for quite a while now we decided against a configurable cache duration. Quite a lot users rely on our proxy for their websites and this generates already a lot of requests which we need to handle. When making the cache duration configurable, everybody would immediately set this to an unnecessarily* small value to get their images as fast as possible which would increase the amount of requests by multiple magnitudes and would immediately get all our accounts blocked because IG is pretty sensitive to high request counts even when you are properly logged in.

And even if one would use our plugin without our proxy, decreasing this duration would just highly increase your chances of getting blocked and relying on the proxy in the long run.

Therefore I'm going to close this issue now because implementing it would create more harm than benefit.