* mixi.el (mixi-cache-expires): Add new constant.
authorbg66 <bg66>
Wed, 25 Oct 2006 04:49:00 +0000 (04:49 +0000)
committerbg66 <bg66>
Wed, 25 Oct 2006 04:49:00 +0000 (04:49 +0000)
(mixi-cache-expired-p): Follow the change above.

ChangeLog
mixi.el

index fc29404..8a22c44 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2006-10-25  OHASHI Akira  <bg66@koka-in.org>
 
+       * mixi.el (mixi-cache-expires): Add new constant.
+       (mixi-cache-expired-p): Follow the change above.
+
+2006-10-25  OHASHI Akira  <bg66@koka-in.org>
+
        * 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 (file)
--- 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."