Fix rudimentary caching messing up and not clearing the pages array, resulting in duplicate nav items when re-caching happens

This commit is contained in:
Matthew Connelly 2015-03-09 01:33:41 +00:00
parent 7a28488fca
commit bdfe6a0fe2
1 changed files with 1 additions and 1 deletions

View File

@ -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$/;