isaacs / node-lru-cache

A fast cache that automatically deletes the least recently used items
http://isaacs.github.io/node-lru-cache/
ISC License
5.38k stars 353 forks source link

FYI - node-lru-cache ported to Deno #176

Closed oguimbal closed 2 years ago

oguimbal commented 4 years ago

I ported node-lru-cache so it is usable in Deno.

You can find it at https://deno.land/x/lru_cache Let me know if you have any problem with that :)

(And thank you for this great lib !)

isaacs commented 2 years ago

No problem at all! That's why I use liberal OSS licenses, that's how the system is supposed to work <3

Two suggestions:

  1. You should add another copyright line to the license with your name, though, since you added more code that isn't mine. (Ie, all the typescript stuff.) If you want to get really fancy, you can do the whole "double embedded license" thing, where you have your entire MIT/ISC/BSD license, then something at the bottom like, "This is a fork of https://github.com/isaacs/node-lru-cache, used under the terms of the following license:" and then my entire license. But just tacking on another (c) line is fine, too, as long as you're ok with continuing to use ISC.
  2. I kinda have a "someday when I get around to it" gardening task to change up the semantics of this module so that I can make it faster. Basically, if we loosen the restriction that length is strictly never greater than cache.max, then we can do some interesting optimizations. How are you planning (or are you planning) to keep your deno fork up to date? I don't know the best answer, but I know "I'll just manually port it again" tends to not work great 😅
Brian-McBride commented 2 years ago

@oguimbal It would be great, since you did a port anyway, to update the @types/lur-cache that are wayyy behind.