protected object GetPostsByTag(string key, GraffitiContext graffitiContext) { PostCollection pc = ZCache.Get<PostCollection>("Tags-" + TagName); if (pc == null) { pc = Post.FetchPostsByTag(TagName); ZCache.InsertCache("Tags-" + TagName, pc, 60); } return pc; }
protected override void LoadContent(GraffitiContext graffitiContext) { IsIndexable = false; graffitiContext["where"] = "tag"; graffitiContext["title"] = TagName + " : " + SiteSettings.Get().Title; graffitiContext["tag"] = TagName; graffitiContext.RegisterOnRequestDelegate("posts",GetPostsByTag); // GetPostsByTag needs to be called so the pager works GetPostsByTag("posts", graffitiContext); }
private void ga_LoadGraffitiContext(GraffitiContext context, EventArgs e) { context["calendarFeeds"] = CalendarFeeds; }
public GraffitiRepository(GraffitiContext db) { Context = db; }