projects
/
scpubgit/SCS.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
4e3f5bd
)
cache sidebar structure to avoid directory scans every request
Matt S Trout [Sat, 16 Jul 2011 20:22:54 +0000 (20:22 +0000)]
lib/SCSite/SidebarFilter.pm
patch
|
blob
|
blame
|
history
diff --git
a/lib/SCSite/SidebarFilter.pm
b/lib/SCSite/SidebarFilter.pm
index
9ce5b81
..
64f804e
100644
(file)
--- a/
lib/SCSite/SidebarFilter.pm
+++ b/
lib/SCSite/SidebarFilter.pm
@@
-36,7
+36,9
@@
sub _latest_blog_posts {
->flatten;
}
-sub _sidebar_structure {
+has _sidebar_structure => (is => 'lazy');
+
+sub _build__sidebar_structure {
my ($self) = @_;
[
[ 'NEWS',