[bknr-cvs] ksprotte changed trunk/projects/bos/web/contract-tree.lisp

BKNR Commits bknr at bknr.net
Tue Jul 15 10:07:07 UTC 2008


Revision: 3440
Author: ksprotte
URL: http://bknr.net/trac/changeset/3440

use contract-node-invalidate-timestamp for remove-contract

U   trunk/projects/bos/web/contract-tree.lisp

Modified: trunk/projects/bos/web/contract-tree.lisp
===================================================================
--- trunk/projects/bos/web/contract-tree.lisp	2008-07-15 10:03:24 UTC (rev 3439)
+++ trunk/projects/bos/web/contract-tree.lisp	2008-07-15 10:07:07 UTC (rev 3440)
@@ -9,8 +9,12 @@
    (kml-req-count :initform 0 :accessor kml-req-count)
    (image-req-count :initform 0 :accessor image-req-count)))
 
-(defun contract-node-set-timestamp-now (node)
-  (setf (timestamp node) (get-universal-time)))
+(defun contract-node-invalidate-timestamp (node)
+  (let ((image (contract-node-find-corresponding-store-image node)))
+    (setf (timestamp node)
+	  (if (and image (probe-file (blob-pathname image)))
+	      (1+ (blob-timestamp image))
+	      (get-universal-time)))))
 
 (defun contract-node-timestamp-updater (contract)
   (lambda (node) (setf (timestamp node)
@@ -102,7 +106,7 @@
       (setf (placemark-contracts node)
             (delete contract (placemark-contracts node)))
       ;; mark intersecting children as dirty
-      (ensure-intersecting-children contract-tree geo-box #'contract-node-set-timestamp-now))))
+      (ensure-intersecting-children contract-tree geo-box #'contract-node-invalidate-timestamp))))
 
 (defun contract-tree-changed (contract-tree contract &key type)
   (case type




More information about the Bknr-cvs mailing list