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

[FR] Request caching #19

Closed
strandofgenius opened this issue Aug 1, 2020 · 4 comments
Closed

[FR] Request caching #19

strandofgenius opened this issue Aug 1, 2020 · 4 comments
Labels
feature-request New feature or request

Comments

@strandofgenius
Copy link

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?

@jsmrtn
Copy link
Owner

jsmrtn commented Aug 4, 2020

@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.

@jsmrtn jsmrtn changed the title Caching Requests to Help Rate Limit [FR] Request caching Aug 4, 2020
@jsmrtn jsmrtn added the feature-request New feature or request label Aug 4, 2020
@jsmrtn jsmrtn added this to the 1.3 milestone Aug 4, 2020
@gjhead
Copy link

gjhead commented Aug 5, 2020

Curious - if using the {% cache %} tag on this, would it start before or directly after the {% set craftagram = craft.craftagram.getInstagramFeed(10) %} line?

@jsmrtn
Copy link
Owner

jsmrtn commented Aug 6, 2020

@gjhead As I understand it, the cache tag would start before the craftagram query.

@jsmrtn jsmrtn modified the milestones: 1.3, 1.4 Oct 22, 2020
@jsmrtn
Copy link
Owner

jsmrtn commented Nov 27, 2020

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.

@jsmrtn jsmrtn closed this as completed Nov 27, 2020
@jsmrtn jsmrtn removed this from the 1.4 milestone Nov 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants