
    h                        S SK Jr  SSKJr  SSKJr  S r " S S\\5      r " S S	\\5      r " S
 S\5      r	SSK
Jr  g)    )annotations   )ImmutableDictMixin)UpdateDictMixinc                J   ^ ^^ [        UU U4S jU U4S jU 4S jST < 35      $ )zReturn a new property object for a cache header. Useful if you
want to add support for a cache extension in a subclass.

.. versionchanged:: 2.0
    Renamed from ``cache_property``.
c                *   > U R                  TTT5      $ N)_get_cache_value)xemptykeytypes    zC:\Users\ROHAN GUPTA\OneDrive\Desktop\mathbuddy-assessment\venv\Lib\site-packages\werkzeug/datastructures/cache_control.py<lambda>(cache_control_property.<locals>.<lambda>   s    !$$S%6    c                *   > U R                  TUT5      $ r	   )_set_cache_value)r   vr   r   s     r   r   r      s    Q''Q5r   c                &   > U R                  T5      $ r	   )_del_cache_value)r   r   s    r   r   r      s    !$$S)r   zaccessor for )property)r   r   r   s   ```r   cache_control_propertyr      s%     65)
w	 r   c                      \ rS rSrSr\" SSS5      r\" SS\5      r\" SS\	5      r
\" S	SS5      rSS
 jrS rS rS rS rS rS r\" \5      rSrg)_CacheControl   aj  Subclass of a dict that stores values for a Cache-Control header.  It
has accessors for all the cache-control directives specified in RFC 2616.
The class does not differentiate between request and response directives.

Because the cache-control directives in the HTTP header use dashes the
python descriptors use underscores for that.

To get a header of the :class:`CacheControl` object again you can convert
the object into a string or call the :meth:`to_header` method.  If you plan
to subclass it and add your own items have a look at the sourcecode for
that class.

.. versionchanged:: 2.1.0
    Setting int properties such as ``max_age`` will convert the
    value to an int.

.. versionchanged:: 0.4

   Setting `no_cache` or `private` to boolean `True` will set the implicit
   none-value which is ``*``:

   >>> cc = ResponseCacheControl()
   >>> cc.no_cache = True
   >>> cc
   <ResponseCacheControl 'no-cache'>
   >>> cc.no_cache
   '*'
   >>> cc.no_cache = None
   >>> cc
   <ResponseCacheControl ''>

   In versions before 0.5 the behavior documented here affected the now
   no longer existing `CacheControl` class.
zno-cache*Nzno-storezmax-agezno-transformc                ^    [         R                  X=(       d    S5        X l        US LU l        g )N )dict__init__	on_updateprovided)selfvaluesr#   s      r   r"   _CacheControl.__init__?   s#    dLb)"d*r   c                |    U[         L a  X;   $ X;   a  X   nUc  U$ Ub   U" U5      nU$ U$ g! [         a     U$ f = f+Used internally by the accessor properties.N)bool
ValueError)r%   r   r   r   values        r   r
   _CacheControl._get_cache_valueD   sb    4<;;IE}! KE L5L " Ls   - 
;;c                    U[         L a  U(       a  SX'   gU R                  US5        gUc  U R                  US5        gUSL a  SX'   gUb  U" U5      X'   gX U'   g)r*   NT)r+   pop)r%   r   r-   r   s       r   r   _CacheControl._set_cache_valueT   sZ    4< 	d#}d#$ 	# $UDI %Ir   c                    X;   a  X	 ggr)   r    )r%   r   s     r   r   _CacheControl._del_cache_valuef   s    ;	 r   c                .    [         R                  " U 5      $ )z6Convert the stored values into a cache control header.)httpdump_headerr%   s    r   	to_header_CacheControl.to_headerk   s    %%r   c                "    U R                  5       $ r	   )r8   r7   s    r   __str___CacheControl.__str__o   s    ~~r   c                    SR                  S [        U R                  5       5       5       5      nS[        U 5      R                   SU S3$ )N c              3  6   #    U  H  u  pU S U< 3v   M     g7f)=Nr    ).0kr   s      r   	<genexpr>)_CacheControl.__repr__.<locals>.<genexpr>s   s     H3G41QCq,3Gs   <>)joinsorteditemsr   __name__)r%   kv_strs     r   __repr___CacheControl.__repr__r   sA    H6$**,3GHH4:&&'q22r   )r#   r$   )r    N)rJ   
__module____qualname____firstlineno____doc__r   no_cacher+   no_storeintmax_ageno_transformr"   r
   r   r   r8   r;   rL   staticmethodcache_property__static_attributes__r    r   r   r   r      sr    !F &j#t<H%j$=H$YC8G).$EL+
 &$
& 3 ""89Nr   r   c                  T    \ rS rSrSr\" SS\5      r\" SS\5      r\" SS\	5      r
Srg)	RequestCacheControly   aU  A cache control for requests.  This is immutable and gives access
to all the request-relevant cache control headers.

To get a header of the :class:`RequestCacheControl` object again you can
convert the object into a string or call the :meth:`to_header` method.  If
you plan to subclass it and add your own items have a look at the sourcecode
for that class.

.. versionchanged:: 2.1.0
    Setting int properties such as ``max_age`` will convert the
    value to an int.

.. versionadded:: 0.5
   In previous versions a `CacheControl` class existed that was used
   both for request and response.
z	max-staler   z	min-freshzonly-if-cachedNr    )rJ   rN   rO   rP   rQ   r   rT   	max_stale	min_freshr+   only_if_cachedrY   r    r   r   r[   r[   y   s4    " '{C=I&{C=I+,<dDINr   r[   c                      \ rS rSrSr\" SS\5      r\" SSS5      r\" SS\5      r	\" SS\5      r
\" S	S\5      r\" S
S\5      rSrg)ResponseCacheControl   a  A cache control for responses.  Unlike :class:`RequestCacheControl`
this is mutable and gives access to response-relevant cache control
headers.

To get a header of the :class:`ResponseCacheControl` object again you can
convert the object into a string or call the :meth:`to_header` method.  If
you plan to subclass it and add your own items have a look at the sourcecode
for that class.

.. versionchanged:: 2.1.1
    ``s_maxage`` converts the value to an int.

.. versionchanged:: 2.1.0
    Setting int properties such as ``max_age`` will convert the
    value to an int.

.. versionadded:: 0.5
   In previous versions a `CacheControl` class existed that was used
   both for request and response.
publicNprivater   zmust-revalidatezproxy-revalidatezs-maxage	immutabler    )rJ   rN   rO   rP   rQ   r   r+   rc   rd   must_revalidateproxy_revalidaterT   s_maxagere   rY   r    r   r   ra   ra      s`    * $HdD9F$YT:G,->dKO-.@$M%j$<H&{D$?Ir   ra      )r5   N)
__future__r   mixinsr   r   r   r!   r   r[   ra    r5   r    r   r   <module>rm      sH    " & #`:OT `:FJ,m J.@= @> r   