How does cache eviction strategy LRU (Least Recently Used) work?
- LRU removes the item that was accessed most recently.
- LRU removes the item that was accessed least recently.
- LRU removes the item with the smallest key.
- LRU removes items randomly.
LRU (Least Recently Used) eviction strategy removes the item from the cache that was accessed the least recently. This ensures that the cache retains the most recently accessed items, optimizing for cache hits.
Loading...
Related Quiz
- How can you pass data from your Express route handler to your EJS view?
- How can you define optional route parameters in Express.js?
- You need to build a middleware that performs multiple operations asynchronously before passing control to the next middleware. How can you ensure that your middleware handles errors effectively and does not hang the application?
- You are maintaining a server that has strict security requirements. You need to allow cross-origin requests but with stringent restrictions. How can you implement CORS to fulfill these requirements while maintaining security?
- Which Express.js function is used to create an instance of a router object?