will create new entries
(zoneId string, name string)
| 60 | |
| 61 | // will create new entries |
| 62 | func (s *FileStore) getEntryAndPin(zoneId string, name string) *CacheEntry { |
| 63 | s.Lock.Lock() |
| 64 | defer s.Lock.Unlock() |
| 65 | entry := s.Cache[cacheKey{ZoneId: zoneId, Name: name}] |
| 66 | if entry == nil { |
| 67 | entry = makeCacheEntry(zoneId, name) |
| 68 | s.Cache[cacheKey{ZoneId: zoneId, Name: name}] = entry |
| 69 | } |
| 70 | entry.PinCount++ |
| 71 | return entry |
| 72 | } |
| 73 | |
| 74 | func (s *FileStore) unpinEntryAndTryDelete(zoneId string, name string) { |
| 75 | s.Lock.Lock() |
no test coverage detected