From: bg66 Date: Wed, 25 Oct 2006 04:49:00 +0000 (+0000) Subject: * mixi.el (mixi-cache-expires): Add new constant. X-Git-Tag: cache-file-branchpoint~31 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=12023364aeae0b06412dc1e6d522e8b2baddaec4;p=elisp%2Fmixi.git * mixi.el (mixi-cache-expires): Add new constant. (mixi-cache-expired-p): Follow the change above. --- 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."