Server IP : 184.107.3.203 / Your IP : 216.73.216.51 Web Server : Apache System : Linux dedicated2.avenfashion.com.ph 4.18.0-553.40.1.el8_10.x86_64 #1 SMP Mon Feb 10 12:11:18 EST 2025 x86_64 User : adminteladeoro ( 1015) PHP Version : 8.2.28 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /usr/lib/python3.6/site-packages/pip/_vendor/cachecontrol/__pycache__/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
3 �Pf- � @ s� d dl Z d dlZd dlmZmZmZ d dlmZmZ dZddd�Z dd� Z G d d � d e�ZG dd� de�Z G d d� de�ZG dd� de�ZdS )� N)� formatdate� parsedate�parsedate_tz)�datetime� timedeltaz%a, %d %b %Y %H:%M:%S GMTc C s |p t j� }|| S )N)r �now)�delta�date� r � /usr/lib/python3.6/heuristics.py�expire_after s r c C s t tj| j� ��S )N)r �calendar�timegmZ timetuple)Zdtr r r �datetime_to_header s r c @ s$ e Zd Zdd� Zdd� Zdd� ZdS )� BaseHeuristicc C s dS )a! Return a valid 1xx warning header value describing the cache adjustments. The response is provided too allow warnings like 113 http://tools.ietf.org/html/rfc7234#section-5.5.4 where we need to explicitly say response is over 24 hours old. z110 - "Response is Stale"r )�self�responser r r �warning s zBaseHeuristic.warningc C s i S )z�Update the response headers with any new headers. NOTE: This SHOULD always include some Warning header to signify that the response was cached by the client, not by way of the provided headers. r )r r r r r �update_headers! s zBaseHeuristic.update_headersc C s@ | j |�}|r<|jj|� | j|�}|d k r<|jjd|i� |S )N�Warning)r �headers�updater )r r Zupdated_headersZwarning_header_valuer r r �apply* s zBaseHeuristic.applyN)�__name__� __module__�__qualname__r r r r r r r r s r c @ s e Zd ZdZdd� ZdS )�OneDayCachezM Cache the response by providing an expires 1 day in the future. c C sR i }d|j krNt|j d �}ttdd�t|d d� � d�}t|�|d<