mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
Cache host labels
This commit is contained in:
parent
0a6b6a41a8
commit
c5b308618b
4 changed files with 14 additions and 10 deletions
|
|
@ -1343,16 +1343,16 @@ end
|
|||
|
||||
-- ##############################################
|
||||
|
||||
function getHostAltNamesKey()
|
||||
return "ntopng.host_labels"
|
||||
function getHostAltNamesKey(ip)
|
||||
return "ntopng.cache.host_labels."..ip
|
||||
end
|
||||
|
||||
function getHostAltName(host_ip)
|
||||
return ntop.getHashCache(getHostAltNamesKey(), host_ip)
|
||||
return ntop.getCache(getHostAltNamesKey(host_ip))
|
||||
end
|
||||
|
||||
function setHostAltName(host_ip, alt_name)
|
||||
ntop.setHashCache(getHostAltNamesKey(), host_ip, alt_name)
|
||||
ntop.setCache(getHostAltNamesKey(host_ip), alt_name)
|
||||
end
|
||||
|
||||
-- ##############################################
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue