(id uint16, addr net.IP)
| 98 | } |
| 99 | |
| 100 | func (m *MemCache) retrieve(id uint16, addr net.IP) (TemplateRecord, bool) { |
| 101 | shard, key := m.getShard(id, addr) |
| 102 | shard.RLock() |
| 103 | defer shard.RUnlock() |
| 104 | v, ok := shard.Templates[key] |
| 105 | |
| 106 | return v.Template, ok |
| 107 | } |
| 108 | |
| 109 | // Dump saves the current templates to hard disk |
| 110 | func (m MemCache) Dump(cacheFile string) error { |