tweet
tweet copied to clipboard
Adding Simple HTML5 Caching (every minute)
For those running into Rate Limiting - https://dev.twitter.com/docs/rate-limiting
Kinda tested....
Interesting. If I'm understanding your intention and code correctly, it looks like this would not support multiple widgets on one page, which isn't ideal... The cache key should probably be related to the API request URL.
Yes, I stored the data under a single key in the local array. You could make that ket specific to each the widget with an ID or hash.]
** Brian Kerr Designer & Developer
[email protected] www.briankerrdesign.com
On Thu, Nov 8, 2012 at 12:53 PM, Steve Purcell [email protected]:
Interesting. If I'm understanding your intention and code correctly, it looks like this would not support multiple widgets on one page, which isn't ideal... The cache key should probably be related to the API request URL.
— Reply to this email directly or view it on GitHubhttps://github.com/seaofclouds/tweet/pull/303#issuecomment-10204456.
Cool. I'll have a play with this code when I get some time. Thanks for sending it over! :-)
Hm, I took a look at this and it sort of looks like there's an infinite chain of caching. load() caches it into tweetData, and then passes the cached information into extractData, which passes the same information back into tweetData if it's an odd minute. Am I missing something, though?