diff -urN saku-3.9.0/file/saku.ini saku-3.9.0-sage/file/saku.ini --- saku-3.9.0/file/saku.ini 2011-01-03 20:30:33.000000000 +0900 +++ saku-3.9.0-sage/file/saku.ini 2011-01-22 20:34:09.000000000 +0900 @@ -10,3 +10,6 @@ [Gateway] visitor: ^127 + +[Application Thread] +sage: yes diff -urN saku-3.9.0/file/sample.ini saku-3.9.0-sage/file/sample.ini --- saku-3.9.0/file/sample.ini 2010-11-20 12:04:18.000000000 +0900 +++ saku-3.9.0-sage/file/sample.ini 2011-01-22 20:09:57.000000000 +0900 @@ -129,3 +129,6 @@ # Auto make thumbnail another size. (yes/no) force_thumbnail: no + +# sage. (yes/no) +sage: yes diff -urN saku-3.9.0/shingetsu/cache.py saku-3.9.0-sage/shingetsu/cache.py --- saku-3.9.0/shingetsu/cache.py 2010-11-20 11:57:58.000000000 +0900 +++ saku-3.9.0-sage/shingetsu/cache.py 2011-01-22 20:18:23.000000000 +0900 @@ -672,11 +672,17 @@ """Add new data cache.""" self.standby_directories() rec.sync() + age = True if really: self[rec.idstr] = rec self.size += len(str(rec)) + 1 self.count += 1 - if self.valid_stamp < rec.stamp: + if self.valid_stamp < rec.stamp: + if config.sage: + if rec.get("mail", ""): + if re.search("[Ss][Aa][Gg][Ee]", rec["mail"]): + age = False + if age: self.valid_stamp = rec.stamp if self.stamp < rec.stamp: self.stamp = rec.stamp @@ -822,7 +828,13 @@ if cache.stamp < rec.stamp: cache.stamp = rec.stamp if cache.valid_stamp < rec.stamp: - cache.valid_stamp = rec.stamp + age = True + if config.sage: + if rec.get("mail", ""): + if re.search("[Ss][Aa][Gg][Ee]", rec["mail"]): + age = False + if age: + cache.valid_stamp = rec.stamp cache.size += len(str(rec)) cache.count += 1 rec.sync() diff -urN saku-3.9.0/shingetsu/config.py saku-3.9.0-sage/shingetsu/config.py --- saku-3.9.0/shingetsu/config.py 2011-01-08 14:49:25.000000000 +0900 +++ saku-3.9.0-sage/shingetsu/config.py 2011-01-22 19:06:50.000000000 +0900 @@ -139,6 +139,8 @@ 'Application Thread', 'force_thumbnail', False, 'boolen') +sage = _get_value(_extconf, 'Application Thread', 'sage', False, 'boolen') + client_cycle = 5*60 # Seconds; Access client.cgi ping_cycle = 5*60 # Seconds; Check nodes sync_cycle = 5*60*60 # Seconds; Check cache