You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by se...@apache.org on 2019/07/17 21:55:42 UTC
[whimsy] branch master updated: WHIMSY-278 Add some debug: why
cache not working
This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git
The following commit(s) were added to refs/heads/master by this push:
new d4b572d WHIMSY-278 Add some debug: why cache not working
d4b572d is described below
commit d4b572d7db1f64acfbfdd9bf5d475d5632c5f9e1
Author: Sebb <se...@apache.org>
AuthorDate: Wed Jul 17 22:55:32 2019 +0100
WHIMSY-278 Add some debug: why cache not working
---
lib/whimsy/asf/member.rb | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/lib/whimsy/asf/member.rb b/lib/whimsy/asf/member.rb
index fc7af88..c12c173 100644
--- a/lib/whimsy/asf/member.rb
+++ b/lib/whimsy/asf/member.rb
@@ -148,9 +148,12 @@ module ASF
member_file = File.join(foundation, 'members.txt')
member_time = File.mtime(member_file)
if member_time.to_i > @@mtime.to_i
+ Wunderbar.warn "Reading #{member_file} #{member_time.to_i} > #{@@mtime.to_i}"
@@mtime = member_time
text = File.read(member_file)
@@text = WeakRef.new(text)
+ else
+ Wunderbar.warn "Using #{member_file} cache @@mtime=#{@@mtime.to_i}"
end
text
@@ -166,6 +169,7 @@ module ASF
# save
@@mtime = Time.now
+ Wunderbar.warn "Caching ASF::Member.text @@mtime=#{@@mtime.to_i}"
@@text = WeakRef.new(text)
end
end