Closed strandofgenius closed 3 years ago
@strandofgenius Yes it would help with rate limiting–the cache
tag would cache the output of the craftagram call, so it wouldn't need to make calls to the controller every time, it would just request the existing record from the database.
Curious - if using the {% cache %}
tag on this, would it start before or directly after the {% set craftagram = craft.craftagram.getInstagramFeed(10) %}
line?
@gjhead As I understand it, the cache
tag would start before the craftagram
query.
I've given this some thought, and don't think this is something we'll include in the plugin. The output of the call can be cached either natively with Craft or with a static page cache (either of which any optimised site should be utilising, in our opinion), so making the plugin cache the response too seems redundant.
I wondered if using
{% cache %}
tag can help with the rate limit? If not is there a chance a feature request could be added to set a value in the admin or something to cache the request for x amount of time?