package main type LRUNode struct { key string val interface{} prev *LRUNode next *LRUNode } type LRU struct { dataMap map[string]*LRUNode head *LRUNode tail *LRUNode capacity int count int } func NewLRU(capacity int)LRU{ head := &LRUNode{} tail := &am…