Function: pdf-cache--initialize

pdf-cache--initialize is a natively compiled function defined in pdf-cache.el.

Signature

(pdf-cache--initialize)

Documentation

Initialize the cache to store document data.

Note: The cache is only initialized once. After that it needs to be cleared before this function makes any changes to it. This is an internal function and not meant to be directly used.

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--initialize ()
  "Initialize the cache to store document data.

Note: The cache is only initialized once. After that it needs to
be cleared before this function makes any changes to it. This is
an internal function and not meant to be directly used."
  (unless pdf-cache--data
    (setq pdf-cache--data (make-hash-table))
    (add-hook 'pdf-info-close-document-hook #'pdf-cache-clear-data nil t)
    (add-hook 'pdf-annot-modified-functions
              #'pdf-cache--clear-data-of-annotations
              nil t)))