소스 검색

org-persist-read: Check expiry

Ihor Radchenko 3 년 전
부모
커밋
1bc8389871
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      lisp/org-persist.el

+ 3 - 0
lisp/org-persist.el

@@ -743,6 +743,9 @@ When LOAD? is non-nil, load the data instead of reading."
          (data nil))
     (when (and collection
                (file-exists-p persist-file)
+               (or (not (plist-get collection :expiry)) ; current session
+                   (not (org-persist--gc-expired-p
+                       (plist-get collection :expiry) collection)))
                (or (not hash-must-match)
                    (and (plist-get associated :hash)
                         (equal (plist-get associated :hash)