Do you think adding support for templates (.htm files or otherwise) would fit with this library?
If you used an xhr request to get the template you could know when the template was loaded. And everything else would fall in with the script caching as well.
Just a thought.
I think this falls under a general "should we support resources other than scripts" question. We've been getting these a lot lately. @sindresorhus @peol @wibblymat Implementation wise this isn't hard. Should we do it or punt?
I don't see much reason not to.
I don't mind at all.
What would happen when trying to store a template that is 0.5kB and the oldest one is a script on like 150kB. We really need some smart logic around what is scrapped and what's not. I'll happily take the overhead fetching the template than dumping the heavy script for example :)
True, it just hit me when I started commenting.
I'll allow it! :)
If we do go down this path it would be useful to discuss some of the challenges involved:
It would be interesting to see basket become a generic asset cacher.