philipbeel/Tweetable

Caching

rctneil opened this issue · 2 comments

Is there a way this can be cached?, say for 1 hour or a day? Just so it doesn't refetch on each refresh?

I could see this being a valuable feature to integrate. I could put the tweet into localstorage and do a check before calling the getmytweets API, then have a parameter which the user can override, which defaults to 1 hour. I will create a feature branch to test this out.

I have added a mechanism into develop branch v2.1 which integrates the caching as discussed previously. I would like to give this more unit test coverage before merging into master, but please feel free to try it out.