Commit e7563090 authored by Gabriel Detraz's avatar Gabriel Detraz

Desactive l'appel au cache

parent 4be25073
......@@ -914,15 +914,9 @@ class RadiusEventHandler(object):
données fournies, en utilisant le cache du module pour
économiser les requêtes à la base LDAP"""
mac = request.get('Calling-Station-Id', None)
if (mac, m_type) in self.__cache:
logger.debug("%s found in module cache", mac)
owner, machine, hosts, plug, room, _ = self.__cache[(mac, m_type)]
return (owner, machine, hosts, plug, room)
else:
logger.debug("%s not found in module cache", mac)
result = self.__find_match(request, m_type)
self.__cache.update({(mac, m_type) : result + (time.time(),)})
return result
result = self.__find_match(request, m_type)
self.__cache.update({(mac, m_type) : result + (time.time(),)})
return result
def _mac_of_nas(self, nas_ip, m_type):
"""Renvoie l'adresse MAC assoiciée à l'IP du NAS donné et du type donné"""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment