Skip to main content
2 of 2
Spelling and grammar
Toby Speight
  • 88.3k
  • 14
  • 104
  • 327
  1. You have put the entire get() and put() methods inside a shared lock. Two threads cannot use this LRU cache in parallel.
  2. You can define DDLNode as a record. Then its instances will be immutable and its members will be public by default.