From bdfe6a0fe2083e5f937a52bb0d17e568b875e18b Mon Sep 17 00:00:00 2001 From: Matthew Connelly Date: Mon, 9 Mar 2015 01:33:41 +0000 Subject: [PATCH] Fix rudimentary caching messing up and not clearing the pages array, resulting in duplicate nav items when re-caching happens --- blogalba | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blogalba b/blogalba index 4046352..b2dc116 100755 --- a/blogalba +++ b/blogalba @@ -115,7 +115,7 @@ sub get_page { sub do_cache { return if $lastcache > (time - 3600); $lastcache = time; - undef @posts and undef @pages if $#posts > 0 or $#pages > 0; + undef @posts;undef @pages; opendir POSTS, "$basedir/posts/" or die "Couldn't open posts directory $basedir/posts/"; while(readdir POSTS) { next unless /\.md$/;