From 12023364aeae0b06412dc1e6d522e8b2baddaec4 Mon Sep 17 00:00:00 2001 From: bg66 Date: Wed, 25 Oct 2006 04:49:00 +0000 Subject: [PATCH] * mixi.el (mixi-cache-expires): Add new constant. (mixi-cache-expired-p): Follow the change above. --- ChangeLog | 5 +++++ mixi.el | 11 +++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index fc29404..8a22c44 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2006-10-25 OHASHI Akira + * mixi.el (mixi-cache-expires): Add new constant. + (mixi-cache-expired-p): Follow the change above. + +2006-10-25 OHASHI Akira + * mixi.el (mixi-retrieve-function): Use `radio' instead of `choice'. (mixi-default-email): Ditto. (mixi-default-password): Ditto. diff --git a/mixi.el b/mixi.el index 8901a1f..81a24ad 100644 --- a/mixi.el +++ b/mixi.el @@ -169,7 +169,8 @@ Increase this value when unexpected error frequently occurs." (defcustom mixi-cache-expires 3600 "*Seconds for expiration of a cached object." :type '(radio (integer :tag "Expired seconds") - (const :tag "Don't expire" nil)) + (const :tag "Don't expire" nil) + (const :tag "Don't cache" t)) :group 'mixi) ;; FIXME: Not implemented. @@ -406,9 +407,11 @@ Increase this value when unexpected error frequently occurs." (let ((timestamp (mixi-object-timestamp object))) (unless (or (null mixi-cache-expires) (null timestamp)) - (mixi-time-less-p - (mixi-time-add timestamp (mixi-seconds-to-time mixi-cache-expires)) - (current-time))))) + (if (numberp mixi-cache-expires) + (mixi-time-less-p + (mixi-time-add timestamp (mixi-seconds-to-time mixi-cache-expires)) + (current-time)) + t)))) (defun mixi-make-cache (key value table) "Make a cache object and return it." -- 1.7.10.4