From 078b579081a29d24f229d87b08701ca6985a75fd Mon Sep 17 00:00:00 2001 From: NiLuJe Date: Sun, 13 Sep 2020 22:14:05 +0200 Subject: [PATCH] More verbose debug logging around OPDS caching (#6653) Re #6649 --- frontend/ui/widget/opdsbrowser.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/ui/widget/opdsbrowser.lua b/frontend/ui/widget/opdsbrowser.lua index 496836826..62a2a4780 100644 --- a/frontend/ui/widget/opdsbrowser.lua +++ b/frontend/ui/widget/opdsbrowser.lua @@ -365,16 +365,18 @@ function OPDSBrowser:parseFeed(item_url, username, password) local feed_last_modified = self:fetchFeed(item_url, username, password, "HEAD") local hash = "opds|catalog|" .. item_url if feed_last_modified then - hash = hash .. feed_last_modified + hash = hash .. "|" .. feed_last_modified end local cache = CatalogCache:check(hash) if cache then + logger.dbg("Cache hit for", hash) feed = cache.feed else - logger.dbg("cache", hash) + logger.dbg("Cache miss for", hash) feed = self:fetchFeed(item_url, username, password) if feed then + logger.dbg("Caching", hash) CatalogCache:insert(hash, CatalogCacheItem:new{ feed = feed }) end end