 
     @cache.users
 
+  userDiscussions: =>
+    if !@cache.userDiscussions
+      @cache.userDiscussions = _.filter @state.discussions, (d) => d.user_id == @state.user.id
+
+    @cache.userDiscussions
+
 
   ujsDiscussionUpdate: (_e, data) =>
     # to allow ajax:complete to be run

        discussion = _.find discussions, id: newDiscussion.id
        discussions = _.reject discussions, id: newDiscussion.id
        newDiscussion = _.merge(discussion, newDiscussion)
        # The discussion list shows discussions started by the current user, so it can be assumed that the first post is theirs
        newDiscussion.starting_post = newDiscussion.posts[0]
        discussions.push(newDiscussion)

      _.each newDiscussion.posts, (newPost) ->
        if postIds.includes(newPost.id)


      users.push(newUser)

    @cache.users = @cache.discussions = @cache.userDiscussions = @cache.beatmaps = null
    @setState
      discussions: _.reverse(_.sortBy(discussions, (d) -> Date.parse(d.starting_post.created_at)))
      posts: _.reverse(_.sortBy(posts, (p) -> Date.parse(p.created_at)))
