Function: pdf-cache-clear-images-if
pdf-cache-clear-images-if is a natively compiled function defined in
pdf-cache.el.
Signature
(pdf-cache-clear-images-if FN)
Documentation
Remove images from the cache according to FN.
FN should be function accepting 4 Arguments (PAGE WIDTH DATA HASH). It should return non-nil, if the image should be removed from the cache.
Source Code
;; Defined in /nix/store/63h5z2vmzn0mfavcxi2idi23g5xcgkbl-emacs-packages-deps/share/emacs/site-lisp/elpa/pdf-tools-20260102.1101/pdf-cache.el
(defun pdf-cache-clear-images-if (fn)
"Remove images from the cache according to FN.
FN should be function accepting 4 Arguments \(PAGE WIDTH DATA
HASH\). It should return non-nil, if the image should be removed
from the cache."
(setq pdf-cache--image-cache
(cl-remove-if
(lambda (image)
(funcall
fn
(pdf-cache--image/page image)
(pdf-cache--image/width image)
(pdf-cache--image/data image)
(pdf-cache--image/hash image)))
pdf-cache--image-cache)))