diff --git a/lisp/image/gravatar.el b/lisp/image/gravatar.el index f6f056a2ba..ebae356e26 100644 --- a/lisp/image/gravatar.el +++ b/lisp/image/gravatar.el @@ -51,6 +51,9 @@ gravatar-cache-ttl :group 'gravatar) (make-obsolete-variable 'gravatar-cache-ttl nil "28.1") +(defconst gravatar-cache-expiry (* 12 60 60) + "Time to live for gravatar cache entries (12 hours.)") + (defcustom gravatar-rating "g" "Most explicit Gravatar rating level to allow. Some gravatars are rated according to how suitable they are for @@ -287,8 +290,7 @@ gravatar-retrieve (defun gravatar--prune-cache () (let ((expired nil) (time (- (time-convert (current-time) 'integer) - ;; Twelve hours. - (* 12 60 60)))) + gravatar-cache-expiry))) (maphash (lambda (key val) (when (< (car val) time) (push key expired)))