ποΈ Deliverables Checklist
| Status |
Component |
Description |
Notes |
| $\square$ |
Node Struct |
Defines key/value pairs and necessary pointers (Prev, Next). |
Core data structure. |
| $\square$ |
LRUCache Struct |
Holds the map, head, tail, capacity, and mutex. |
Container logic. |
| $\square$ |
NewLRUCache() |
Constructor function. |
Initialization logic. |
| $\square$ |
moveToHead(node *Node) |
Helper method for list re-linking. |
Essential $O(1)$ operation. |
| $\square$ |
Get(key KeyType) (ValueType, bool) |
Retrieves item and updates usage order. |
Includes mutex lock. |
| $\square$ |
Put(key KeyType, value ValueType) |
Inserts/updates item, handles eviction when capacity is exceeded. |
Includes mutex lock & size check. |
| $\square$ |
Unit Tests (Go testing package) |
Comprehensive tests covering all edge cases and concurrency. |
Verification of correctness. |
Generated from lru_cache.md Β· 8 Oct 2026 16:36