;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301\302\303\304DD\305\306\307\310\311&\207" [custom-declare-variable sx-cache-directory funcall function #[0 "\300\301!\207" [locate-user-emacs-file ".sx"] 2] "Directory containing cached data." :type directory :group sx] 8) #@37 Ensure `sx-cache-directory' exists. (defalias 'sx-cache--ensure-sx-cache-directory-exists #[0 "\301!?\205\n\302!\207" [sx-cache-directory file-exists-p mkdir] 2 (#$ . 330)]) #@72 Expand FILENAME in the context of `sx-cache-directory'. (fn FILENAME) (defalias 'sx-cache-get-file-name #[257 "\301\302!\303P\"\207" [sx-cache-directory expand-file-name symbol-name ".el"] 4 (#$ . 513)]) #@212 Return the data within CACHE. If CACHE does not exist, use `sx-cache-set' to set CACHE to the result of evaluating FORM. CACHE is resolved to a file name by `sx-cache-get-file-name'. (fn CACHE &optional FORM) (defalias 'sx-cache-get #[513 "\300 \210\301!\302!\203%\303\304\305\"r\211q\210\306\307\"\216\310\301!!\210\311\312 !*\207\313\314!\"\207" [sx-cache--ensure-sx-cache-directory-exists sx-cache-get-file-name file-exists-p generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] insert-file-contents read buffer-string sx-cache-set eval] 7 (#$ . 727)]) #@169 Set the content of CACHE to DATA and save. DATA will be written as returned by `prin1'. CACHE is resolved to a file name by `sx-cache-get-file-name'. (fn CACHE DATA) (defalias 'sx-cache-set #[514 "\302 \210\303\211\304\305!\303\306!#\210*\207" [print-level print-length sx-cache--ensure-sx-cache-directory-exists nil write-region prin1-to-string sx-cache-get-file-name] 7 (#$ . 1358)]) #@217 Set cache CACHE to nil. VARS is a list of variables to unbind to ensure cache is cleared. If INIT-METHOD is defined, call it after all invalidation to re-initialize the cache. (fn CACHE &optional VARS INIT-METHOD) (defalias 'sx-cache--invalidate #[769 "\300!\301!\266\302\303\"\210\211\205\211 \207" [sx-cache-get-file-name delete-file mapc makunbound] 6 (#$ . 1757)]) #@487 Invalidate all caches using `sx-cache--invalidate'. Afterwards reinitialize caches using `sx-initialize'. If SAVE-AUTH is non-nil, do not clear AUTH cache. Interactively, SAVE-AUTH is the negation of the prefix argument. That is, by default the auth cache is PRESERVED interactively. If you provide a prefix argument, the auth cache is INVALIDATED. Note: This will also remove read/unread status of questions as well as delete the list of hidden questions. (fn &optional SAVE-AUTH) (defalias 'sx-cache-invalidate-all #[256 "\302\303!\203\304\305\"\262\306\307\310\311$\210\312\313\"\210\314\315!)\207" [sx-cache-directory default-directory file-expand-wildcards "*.el" cl-remove-if #[257 "\211\300\230\207" ["auth.el"] 3 "\n\n(fn X)"] lwarn sx :debug "Invalidating: %S" mapc delete-file sx-initialize force] 7 (#$ . 2141) (byte-code "?C\207" [current-prefix-arg] 1)]) (provide 'sx-cache)