core (disco): do not cache disco items when node is set
This commit is contained in:
parent
a68772cdeb
commit
7045ad3f1c
1 changed files with 5 additions and 2 deletions
|
|
@ -198,9 +198,12 @@ class Discovery(object):
|
|||
@param use_cache(bool): if True, use cached data if available
|
||||
@return: a Deferred which fire disco.DiscoItems
|
||||
"""
|
||||
server_jid = jid.JID(client.jid.host)
|
||||
if jid_ is None:
|
||||
jid_ = jid.JID(client.jid.host)
|
||||
# we cache items only for our own server
|
||||
jid_ = server_jid
|
||||
|
||||
if jid_ == server_jid and not node:
|
||||
# we cache items only for our own server and if node is not set
|
||||
try:
|
||||
items = self.host.memory.getEntityData(jid_, ["DISCO_ITEMS"], client.profile)["DISCO_ITEMS"]
|
||||
log.debug(u"[%s] disco items are in cache" % jid_.full())
|
||||
|
|
|
|||
Loading…
Reference in a new issue