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:
parent
7a28488fca
commit
bdfe6a0fe2
2
blogalba
2
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$/;
|
||||
|
|
Loading…
Reference in New Issue