From b52e34ef5ee25b31cd74b6e3f766bb77afe55b75 Mon Sep 17 00:00:00 2001
From: remusb <remus.bunduc@gmail.com>
Date: Fri, 23 Mar 2018 22:41:01 +0200
Subject: [PATCH] cache: add info log on notification - for #2150

---
 backend/cache/cache.go | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/backend/cache/cache.go b/backend/cache/cache.go
index 439c3ac13..e33eda4cd 100644
--- a/backend/cache/cache.go
+++ b/backend/cache/cache.go
@@ -518,7 +518,16 @@ func (f *Fs) httpExpireRemote(in rc.Params) (out rc.Params, err error) {
 
 // receiveChangeNotify is a wrapper to notifications sent from the wrapped FS about changed files
 func (f *Fs) receiveChangeNotify(forgetPath string, entryType fs.EntryType) {
-	fs.Debugf(f, "notify: expiring cache for '%v'", forgetPath)
+	if crypt, yes := f.isWrappedByCrypt(); yes {
+		decryptedPath, err := crypt.DecryptFileName(forgetPath)
+		if err == nil {
+			fs.Infof(decryptedPath, "received cache expiry notification")
+		} else {
+			fs.Infof(forgetPath, "received cache expiry notification")
+		}
+	} else {
+		fs.Infof(forgetPath, "received cache expiry notification")
+	}
 	// notify upstreams too (vfs)
 	f.notifyChangeUpstream(forgetPath, entryType)