+
    Dfj                     `    R t ^ RIHt ^ RIHtHt ^ RIHtHt  ! R R]P                  4      t
R# )z 
An in-memory caching resolver.
)defer)commondns)failurelogc                   ^   a  ] tR t^t o RtRtRR ltR tR tR t	RR lt
RR ltR	 tR
tV tR# )CacheResolverzw
A resolver that serves records from a local, memory cache.

@ivar _reactor: A provider of L{interfaces.IReactorTime}.
Nc                    \         P                  P                  V 4       / V n        W n        / V n        Vf   ^ RIHp W0n        V'       d1   VP                  4        F  w  pw  rVV P                  WFV4       K  	  R # R # )N)reactor)r   ResolverBase__init__cacheverbosecanceltwisted.internetr
   _reactoritemscacheResult)selfr   r   r
   querysecondspayloads   &&&&   5/usr/lib/python3/dist-packages/twisted/names/cache.pyr   CacheResolver.__init__   sf    $$T*
?0-2[[]))  9 .;     c                   Wn         V P                  P                  4       pV P                  P	                  4        FK  w  pw  pw  rVpW$,
          pWV,           V,            F$  p	V	P
                  V8  g   K  V P                  V  KI  	  KM  	  R # N)__dict__r   r   r   r   ttl)
r   statenowkwhenansaddnsdiffrecs
   &&        r   __setstate__CacheResolver.__setstate__&   sp    mm##%)-)9)9);%A%ns:Dy2~~77T>

1 & *<r   c                    V P                   P                  4        F  pVP                  4        K  	  V P                   P                  4        V P                  # r   )r   valuesclearr   )r   cs   & r   __getstate__CacheResolver.__getstate__1   s<    ##%AHHJ &}}r   c                   V P                   P                  4       p\        P                  ! WV4      p V P                  V,          w  pw  rp
V P
                  '       d'   \        P                  ! R \        V4      ,           4       WW,
          p V Uu. uF`  p\        P                  ! VP                  P                  VP                  VP                  VP                  V,
          VP                  4      NKb  	  upV	 Uu. uF`  p\        P                  ! VP                  P                  VP                  VP                  VP                  V,
          VP                  4      NKb  	  upV
 Uu. uF`  p\        P                  ! VP                  P                  VP                  VP                  VP                  V,
          VP                  4      NKb  	  up3p\        P                   ! V4      # u upi u upi u upi   \"         dB    \        P$                  ! \&        P(                  ! \        P*                  ! T4      4      4      u # i ; i  \,         dy    T P
                  ^8  d'   \        P                  ! R\        T4      ,           4       \        P$                  ! \&        P(                  ! \        P*                  ! T4      4      4      u # i ; i)zCache hit for zCache miss for )r   r   r   Queryr   r   r   msgreprRRHeadernametypeclsr   r   r   succeed
ValueErrorfailr   FailureDomainErrorKeyError)r   r5   r7   r6   timeoutr    qr"   r#   authr$   r&   rresults   &&&&&         r   _lookupCacheResolver._lookup7   s   mm##%IId#&#	-%)ZZ]"D"3c |||(4:56:D- "%	 "%A FFKKaii "%	 "&	 "&A FFKKaii "&	 "%	 "%A FFKKaii "%	. }}V,,-  Jzz'//#//$2G"HIIJ=  	F||a)DJ67::goocood.CDEE	FsR   I G8 A&G)7G8 =A&G.#G8 )A&G3G8 )G8 8A	IIB K
	K
c                ~    \         P                  ! \        P                  ! \        P
                  ! V4      4      4      # r   )r   r:   r   r;   r   r<   )r   r5   r>   s   &&&r   lookupAllRecordsCacheResolver.lookupAllRecords_   s#    zz'//#//$*?@AAr   c                   V P                   ^8  d   \        P                  ! RV,          4       T;'       g    V P                  P	                  4       V3V P
                  V&   WP                  9   d"   V P                  V,          P                  4        \        V^ ,          4      \        V^,          4      ,           \        V^,          4      ,           pV'       d3   V^ ,          P                  pV F  p\        WVP                  4      pK  	  M^ pV P                  P                  WPP                  V4      V P                  V&   R# )aq  
Cache a DNS entry.

@param query: a L{dns.Query} instance.

@param payload: a 3-tuple of lists of L{dns.RRHeader} records, the
    matching result of the query (answers, authority and additional).

@param cacheTime: The time (seconds since epoch) at which the entry is
    considered to have been added to the cache. If L{None} is given,
    the current time is used.
zAdding %r to cacheN)r   r   r2   r   r   r   r   listr   min	callLater
clearEntry)r   r   r   	cacheTimesmrA   s   &&&&   r   r   CacheResolver.cacheResultb   s     <<!GG(501&AA$--*?*?*A7K

5KKKK%%'tGAJ//$wqz2BB!A55M  A!]]44QOEr   c                :    V P                   V V P                  V R # r   )r   r   )r   r   s   &&r   rL   CacheResolver.clearEntry   s    JJuKKr   )r   r   r   r   r   )N    Nr   )__name__
__module____qualname____firstlineno____doc__r   r   r(   r.   rC   rF   r   rL   __static_attributes____classdictcell__)__classdict__s   @r   r   r      s<      E:	&-PBP> r   r   N)rX   r   r   twisted.namesr   r   twisted.pythonr   r   r   r    r   r   <module>r_      s)   

 # % 'tF'' tr   