cache local instance (#572)

* cache local instance

fix #564

* don't use local instance cache for plm

* use instance cache for plm, but initialize it

* cargo fmt
This commit is contained in:
fdb-hiroshima
2019-05-10 22:59:34 +02:00
committed by Baptiste Gelez
parent 5b50f90d2b
commit 773fbfe7c8
20 changed files with 123 additions and 88 deletions
+2 -2
View File
@@ -13,7 +13,7 @@
<meta content="120" property="og:image:width" />
<meta content="120" property="og:image:height" />
<meta content="summary" property="twitter:card" />
<meta content="'@Instance::get_local(ctx.0).unwrap().name" property="og:site_name" />
<meta content="'@Instance::get_local().unwrap().name" property="og:site_name" />
<meta content="@blog.ap_url" property="og:url" />
<meta content="@blog.fqn" property="profile:username" />
<meta content="@blog.title" property="og:title" />
@@ -21,7 +21,7 @@
<meta content="@blog.summary_html" property="og:description" />
<meta content="@blog.icon_url(ctx.0)" property="og:image" />
<link href='@Instance::get_local(ctx.0).unwrap().compute_box("~", &blog.fqn, "atom.xml")' rel='alternate' type='application/atom+xml'>
<link href='@Instance::get_local().unwrap().compute_box("~", &blog.fqn, "atom.xml")' rel='alternate' type='application/atom+xml'>
<link href='@blog.ap_url' rel='alternate' type='application/activity+json'>
}, {
<a href="@uri!(blogs::details: name = &blog.fqn, page = _)">@blog.title</a>