From 005ea7957a75e53b443bbc5a596909df457343b8 Mon Sep 17 00:00:00 2001 From: pacien Date: Mon, 26 Oct 2020 12:43:49 +0100 Subject: compiler/Caching: fix cache thumbnail masking in index GitHub: closes #280 --- compiler/src/Compiler.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'compiler/src/Compiler.hs') diff --git a/compiler/src/Compiler.hs b/compiler/src/Compiler.hs index 1ec55c5..4111f02 100644 --- a/compiler/src/Compiler.hs +++ b/compiler/src/Compiler.hs @@ -147,8 +147,8 @@ compileGallery configPath inputDirPath outputDirPath outputIndexPath excludedDir cachedIndex <- loadCachedIndex galleryIndexPath let cache = mkCache cachedIndex - let itemProc = itemProcessor config (cache Resource.properties) - let thumbnailProc = thumbnailProcessor config (cache Resource.thumbnail) + let itemProc = itemProcessor config (cache $ return . Resource.properties) + let thumbnailProc = thumbnailProcessor config (cache $ fmap return . Resource.thumbnail) let galleryBuilder = buildGalleryTree itemProc thumbnailProc (tagsFromDirectories config) resources <- galleryBuilder curatedInputTree @@ -170,7 +170,7 @@ compileGallery configPath inputDirPath outputDirPath outputIndexPath excludedDir then return Nothing else loadGalleryIndex galleryIndexPath - mkCache :: Maybe GalleryIndex -> (GalleryItem -> a) -> Cache a + mkCache :: Maybe GalleryIndex -> (GalleryItem -> Maybe a) -> Cache a mkCache refGalleryIndex = if rebuildAll then const noCache -- cgit v1.2.3