| Server IP : 217.160.0.212 / Your IP : 216.73.216.71 Web Server : Apache System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64 User : sws1073854427 ( 1073854427) PHP Version : 8.4.23 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /usr/share/emacs/28.2/lisp/url/ |
Upload File : |
;ELC
;;; Compiled
;;; in Emacs version 28.2
;;; with all optimizations.
(byte-code "\300\301!\210\300\302!\210\300\303!\210\304\305\306\307\310DD\311\312\313\314\315&\210\304\316\306\307\317DD\320\321\322\312\323\314\324& \207" [require url-parse url-util url custom-declare-variable url-cache-directory funcall function #[0 "\301\302\"\207" [url-configuration-directory expand-file-name "cache"] 3 #1=""] "The directory where cache files should be stored." :type directory :group url-file url-cache-expire-time #[0 "\300\207" [3600] 1 #1#] "Default maximum time in seconds before cache files expire.\nUsed by the function `url-cache-expired'." :version "24.1" integer url-cache] 10)
#@86 Follows the documentation of `file-writable-p', unlike `file-writable-p'.
(fn FILE)
(defalias 'url-cache-file-writable-p #[257 "\300!\205 \301!\203 \302!?\207\302\303!!\207" [file-writable-p file-exists-p file-directory-p file-name-directory] 4 (#$ . 698)])
#@502 Make it possible to cache data in FILE.
Creates any necessary parent directories, deleting any non-directory files
that would stop this. Returns nil if parent directories can not be
created. If FILE already exists as a non-directory, it changes
permissions of FILE or deletes FILE to make it possible to write a new
version of FILE. Returns nil if this can not be done, or if FILE already
exists as a directory. Otherwise, returns t, indicating that
FILE can be created or overwritten.
(fn FILE)
(defalias 'url-cache-prepare #[257 "\300!\203 \301\207\302!\203 \303\207\3041 \305\306!\301\"\206 \3010\207\210\303\207" [url-cache-file-writable-p t file-directory-p nil (error) make-directory file-name-directory] 4 (#$ . 970)])
#@54 Store buffer BUFF in the cache.
(fn &optional BUFF)
(defalias 'url-store-in-cache #[256 "r\301\206 p!q\210\302\303\304!!\305!\205 \306\307ed\310\311%)\262)\207" [coding-system-for-write get-buffer url-cache-create-filename url-view-url t url-cache-prepare binary write-region nil 5] 8 (#$ . 1714)])
#@70 Fetch URL from cache and return a buffer with the content.
(fn URL)
(defalias 'url-fetch-from-cache #[257 "r\300\301!q\210\302\303!!\210p)\207" [generate-new-buffer " *temp*" url-cache-extract url-cache-create-filename] 4 (#$ . 2027)])
#@121 Return non-nil if the URL is cached.
The actual return value is the last modification time of the cache file.
(fn URL)
(defalias 'url-is-cached #[257 "\300!\301!\205! \302!\205! \211\211@\262\303=?\205! \211\3048\262\207" [url-cache-create-filename file-attributes file-exists-p t 5] 6 (#$ . 2272)])
#@57 Return a filename in the local cache for URL.
(fn URL)
(defalias 'url-cache-create-filename-human-readable #[257 "\211\205\337 \303!\304!>\204 \305\306\307D\"\210\211\310H\304!>\204( \305\306\307D\"\210\311H\312 \2062 \313\314\315\2069 \316\317\"!BB\304!>\204N \305\306\307D\"\210\320H\211\203j \211G\321U\204j \211\321H\322U\203j \211\310\323O\262\211\203z \323C\324\325\326\"\327#\266\202\211\205\203 \324\330\327#\262\211\204\215 \323\202\313 \211\327\230\204\231 \211\331\230\203\235 \202\313 \332!\322U\203\273 \211\333\323O\331\230\203\264 \211 P\202\313 \211\310\323O\202\313 \211\333\323O\331\230\203\312 \211 P\202\313 \211\262\211\205\335 \334\334\324\335\331#\n\"\"\266\205\207" [cl-struct-url-tags url-directory-index-file url-cache-directory url-generic-parse-url type-of signal wrong-type-argument url 1 4 user-real-login-name "file" reverse split-string "localhost" "\\." 6 0 47 nil mapconcat make-closure #[257 "\211\301U\203 \300\242\203 \300\302\240\210\303\207\211\301U\203 \300\304\240\210\305\207\300\302\240\210\306!\207" [V0 47 nil "%2F" t "/" char-to-string] 3 "\n\n(fn X)"] #1="" #[257 "\211\300U\203 \301\207\302!\207" [126 #1# char-to-string] 3 "\n\n(fn X)"] "/" string-to-char -1 expand-file-name identity] 13 (#$ . 2586)])
#@123 Create a cached filename using MD5.
Very fast if you have an `md5' primitive function, suitably fast otherwise.
(fn URL)
(defalias 'url-cache-create-filename-using-md5 #[257 "\211\205i \302!\303!\304!>\204 \305\306\307D\"\210\211\310H\304!>\204+ \305\306\307D\"\210\311H\312 \2065 \313\314\315\316\206= \317\320\"\"\237BB\304!>\204S \305\306\307D\"\210\321H\211\205g \322\322\323\324\325# \"\"\266\206\207" [cl-struct-url-tags url-cache-directory md5 url-generic-parse-url type-of signal wrong-type-argument url 1 4 user-real-login-name "file" delq nil split-string "localhost" "\\." 6 expand-file-name mapconcat identity "/"] 14 (#$ . 3879)])
(byte-code "\300\301\302\303\304DD\305\306\307\310\311&\207" [custom-declare-variable url-cache-creation-function funcall function #[0 "\300\207" [url-cache-create-filename-using-md5] 1 ""] "What function to use to create a cached filename." :type (choice (const :tag "MD5 of filename (low collision rate)" :value url-cache-create-filename-using-md5) (const :tag "Human readable filenames (higher collision rate)" :value url-cache-create-filename-human-readable) (function :tag "Other")) :group url-cache] 8)
#@12
(fn URL)
(defalias 'url-cache-create-filename #[257 "\302\303! >\203 \202 \304!!!\207" [url-cache-creation-function cl-struct-url-tags url-recreate-url type-of url-generic-parse-url] 5 (#$ . 5061)])
#@52 Extract FNAM from the local disk cache.
(fn FNAM)
(defalias 'url-cache-extract #[257 "\300 \210\301\302!\210\303!\207" [erase-buffer set-buffer-multibyte nil insert-file-contents-literally] 3 (#$ . 5274)])
#@224 Return non-nil if a cached URL is older than EXPIRE-TIME seconds.
The default value of EXPIRE-TIME is `url-cache-expire-time'.
If `url-standalone-mode' is non-nil, cached items never expire.
(fn URL &optional EXPIRE-TIME)
(defalias 'url-cache-expired #[513 "\203 \302\303!!?\207\304!\211?\206 \305\306\206 \"\307\"\207" [url-standalone-mode url-cache-expire-time file-exists-p url-cache-create-filename url-is-cached time-less-p time-add nil] 7 (#$ . 5489)])
#@150 Remove all expired files from the cache.
`url-cache-expire-time' says how old a file has to be to be
considered "expired".
(fn &optional DIRECTORY)
(defalias 'url-cache-prune-cache #[256 "\302 \303\211\206 \262\304!\205h \305\306\"\211\203[ \211@\307!\310\235\204T T\262\311!\203: \312!\203T T\262\202T \313\314\315!\3168\262 \"\"\203T \317!\210T\262A\266\202\202 \210\211W?\205h \320!\210\306\207" [url-cache-directory url-cache-expire-time current-time 0 file-exists-p directory-files t file-name-nondirectory ("." "..") file-directory-p url-cache-prune-cache time-less-p time-add file-attributes 5 delete-file delete-directory] 11 (#$ . 5965)])
(provide 'url-cache)