
    j	iy                         d Z ddlZddlmZ ddlmZ ddlmZ  ej        e	          Z
dZ G d	 d
ej                  Z ee          ZdS )z;App Engine memcache based cache for the discovery document.    N)memcache   )base   )DISCOVERY_DOC_MAX_AGEzgoogle-api-clientc                   $    e Zd ZdZd Zd Zd ZdS )Cachez%A cache with app engine memcache API.c                     || _         dS )zTConstructor.

        Args:
          max_age: Cache expiration in seconds.
        N)_max_age)selfmax_ages     j/srv/django_bis/venv311/lib/python3.11/site-packages/googleapiclient/discovery_cache/appengine_memcache.py__init__zCache.__init__"   s          c                     	 t          j        |t                    S # t          $ r'}t                              |d           Y d }~d S d }~ww xY w)N)	namespaceTexc_info)r   get	NAMESPACE	ExceptionLOGGERwarning)r   urles      r   r   z	Cache.get*   sc    	-<y9999 	- 	- 	-NN1tN,,,,,,,,,	-s    
AA		Ac                     	 t          j        ||t          | j                  t                     d S # t
          $ r'}t                              |d           Y d }~d S d }~ww xY w)N)timer   Tr   )r   setintr   r   r   r   r   )r   r   contentr   s       r   r   z	Cache.set0   sw    	-LgC,>,>)TTTTTT 	- 	- 	-NN1tN,,,,,,,,,	-s   /3 
A$AA$N)__name__
__module____qualname____doc__r   r   r    r   r   r	   r	      sG        //     - - -- - - - -r   r	   )r   )r$   logginggoogle.appengine.apir    r   discovery_cacher   	getLoggerr!   r   r   r	   cacher%   r   r   <module>r,      s    B A  * ) ) ) ) )       3 3 3 3 3 3		8	$	$	- - - - -DJ - - -0 	+,,,r   