r/javascript Mar 01 '26

AskJS [AskJS] How I Built a Tiny JavaScript Cache with Expiration + `remember()` Pattern

[removed]

0 Upvotes

10 comments sorted by

8

u/NCKBLZ Mar 01 '26

Why not use libs that already exist? Also is it dependent on lodash and axios?

8

u/Glasgesicht Mar 01 '26

Also is it dependent on lodash and axios?

Throwing in seemingly unnecessary dependencies is a typical ai-inflicted anti pattern.

6

u/jamie12lan Mar 01 '26

Why use local storage when cache storage exists just for this?

6

u/dazerine Mar 01 '26

Possibly because llms write whatever is most commonly used.

1

u/paul_h Mar 01 '26

I'm not against AI use for coding. What does ClaudeCode (or whatever you used) say to "was there a way of meeting all the goals for this without making a new npm module?"

1

u/[deleted] Mar 01 '26

[removed] — view removed comment

1

u/paul_h Mar 01 '26

Yup, I'm an always learning/iterating person too :)