Skip to content
This repository has been archived by the owner on May 3, 2021. It is now read-only.

New feature: Caching instagram response option #97

Merged
merged 5 commits into from
Dec 24, 2020
Merged

New feature: Caching instagram response option #97

merged 5 commits into from
Dec 24, 2020

Conversation

m0nclous
Copy link
Collaborator

No description provided.

@mahotilo
Copy link
Collaborator

I have tested this commit and can confirm its efficiency. There are no errors after a hundred of page reload in a row.

@jsanahuja
Copy link
Owner

jsanahuja commented Dec 24, 2020

I have invited you to be contributor @mahotilo (should have received an email) so you could review the code too :)

@jsanahuja jsanahuja requested review from mahotilo and jsanahuja and removed request for csanahuja December 24, 2020 14:07
@mahotilo
Copy link
Collaborator

@jsanahuja,
really, it is an honour for me. I will try my best, but I'll refrain from rash actions :)

@jsanahuja
Copy link
Owner

I made some small changes:

  • According to Semantic Versioning, any new feature should change the x.Y.z number so in this case it should be 1.5.0. As I think this feature should be enabled by default, I have set a default cache_time to 2 hours and as this would change the 1.4.1 version behavior we will release the 2.0.0 version.
  • I have changed the code to use the localStorage API (setItem and getItem) instead of treating it as an object.
  • Changed the localStorage keys to use username/tag instead of the url.

Thank you, really a great feature and a good work :)

Should solve #99 #96 #95 #94 among others.

Copy link
Collaborator

@mahotilo mahotilo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is not 2 hours too long for cache expire?
I do not know what an IG limit is, but maybe it is possible to start from 60 min?
In any case, the default cache "ON" is a great solution.

@jsanahuja
Copy link
Owner

Is not 2 hours too long for cache expire?

I don't really know, depends on how often does people publish on their Instagram accounts. If you have instagramFeed cached and I publish a picture it would take you 2 hours at most to see it in the website. If you guys think this is too much we can change it

@mahotilo
Copy link
Collaborator

mahotilo commented Dec 24, 2020

If you have instagramFeed cached and I publish a picture it would take you 2 hours at most to see it in the website. If you guys think this is too much we can change it

I am just afraid of a new wave of "bugs" like "I have published post, but the script doesn't show it" :)

@jsanahuja jsanahuja mentioned this pull request Dec 24, 2020
@jsanahuja jsanahuja merged commit 4e77a43 into jsanahuja:master Dec 24, 2020
@jsanahuja
Copy link
Owner

If you have instagramFeed cached and I publish a picture it would take you 2 hours at most to see it in the website. If you guys think this is too much we can change it

I am just afraid of a new wave of "bugs" like "I have published post, but the script doesn't show it" :)

I think that is better than "Stopped working" haha

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants