DEV Community

Discussion on: Using LRU Cache in Node.js and TypeScript

Collapse
 
jankapunkt profile image
Jan Küster 🔥

What's the advantage/disadvantage compared to eTag?

Collapse
 
ankit_aabad_be198a64a0520 profile image
Ankit Aabad • Edited

eTag is basically client telling the server I already have this resource with this tag if it has changed then please send me the new data otherwise send me 304.
Lru Cache as used here is server checking if I already have the data (previously fetched) then I don't need to fetch it from database.
I think it is wrongly implied that you don't need to make api call.