
    iF                         S r SSKJr   SSKJr  Sr	\" \	5      SS	 j5       r
\" \	5      SS
 j5       r\" \	5      SS j5       r\" \	5      SS j5       rg! \ a    SSKJr  S r NTf = f)z
Node Searching with Cache.

.. note:: These functions require https://pypi.org/project/fastcache/, otherwise caching is not active.
   )search    )
clru_cachewrapsc                     S nU$ )Nc                 0   ^  [        T 5      U 4S j5       nU$ )Nc                     > T" U 0 UD6$ )N )argskwargsfuncs     A/app/mltbenv/lib/python3.13/site-packages/anytree/cachedsearch.pywrapped*_cache.<locals>.decorator.<locals>.wrapped   s    T,V,,    r   )r   r   s   ` r   	decorator_cache.<locals>.decorator   s     4[- - Nr   r   )sizer   s     r   _cacher      s    	 r       Nc           	      .    [         R                  " XX#XES9$ )z.Identical to :any:`search.findall` but cached.)filter_stopmaxlevelmincountmaxcount)r   findall)noder   r   r   r   r   s         r   r   r      s     >>$dX`ttr   c           	      .    [         R                  " XX#XES9$ )z6Identical to :any:`search.findall_by_attr` but cached.)namer   r   r   )r   findall_by_attr)r   valuer!   r   r   r   s         r   r"   r"   %   s     !!$DV^rrr   c                 ,    [         R                  " XX#S9$ )z+Identical to :any:`search.find` but cached.)r   r   r   )r   find)r   r   r   r   s       r   r%   r%   +   s     ;;t4KKr   c                 ,    [         R                  " XX#S9$ )z3Identical to :any:`search.find_by_attr` but cached.)r!   r   )r   find_by_attr)r   r#   r!   r   s       r   r'   r'   1   s     tIIr   )NNNNN)r!   NNN)NNN)r!   N)__doc__ r   	fastcacher   r   ImportError	functoolsr   
CACHE_SIZEr   r"   r%   r'   r   r   r   <module>r.      s    ." 
 
u u
 
s s
 
L L
 
J JM  		s   A A%$A%