(id string)
| 104 | } |
| 105 | |
| 106 | func (w *autoRefreshCache) Get(id string) CacheItem { |
| 107 | if val, ok := w.lruMap.Get(id); ok { |
| 108 | return val.(CacheItem) |
| 109 | } |
| 110 | return nil |
| 111 | } |
| 112 | |
| 113 | // Return the item if exists else create it. |
| 114 | // Create should be invoked only once. recreating the object is not supported. |