You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by cu...@apache.org on 2020/02/17 02:50:22 UTC

[whimsy] branch master updated: Delete cache since format changed

This is an automated email from the ASF dual-hosted git repository.

curcuru 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 602bb9a  Delete cache since format changed
602bb9a is described below

commit 602bb9a0226087831656aaaba35d259c1259d69b
Author: Shane Curcuru <as...@shanecurcuru.org>
AuthorDate: Sun Feb 16 21:50:09 2020 -0500

    Delete cache since format changed
---
 www/members/list-traffic.cgi | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/www/members/list-traffic.cgi b/www/members/list-traffic.cgi
index d1ffc49..46d2c72 100755
--- a/www/members/list-traffic.cgi
+++ b/www/members/list-traffic.cgi
@@ -181,6 +181,18 @@ _html do
       months = Dir["#{SRV_MAIL}/*"].map {|path| File.basename(path).untaint}.grep(/^\d+$/)
       attendance = MeetingUtil.get_attendance(ASF::SVN['Meetings'])
       style_cohorts(attendance)
+      if ENV['QUERY_STRING'].include? 'Clear-Cache-No-Really'
+        _p do # Danger, Will Robinson!
+          _ 'Note: deleting cached .json files: '
+          cache = Dir["#{SRV_MAIL}/??????.json"]
+          ctr = 0
+          cache.each do |f|
+            File.delete(f.untaint)
+            ctr += 1
+          end
+          _ "Successfully deleted #{ctr} files (will be rebuilt now)."
+        end
+      end
       if ENV['QUERY_STRING'].include? 'week'
         display_weekly(months: months, nondiscuss: MailUtils::NONDISCUSSION_SUBJECTS["<#{LIST_ROOT}.apache.org>"])
       else