Exemplo n.º 1
0
 def unfollow_user(self, user):
     self.following.remove(user)
     # invalidate caches
     following_cache = UserFollowingCache(prekey=self.user.id)
     following_cache.invalidate_cache()
     followers_cache = UserFollowersCache(prekey=user.id)
     followers_cache.invalidate_cache()
Exemplo n.º 2
0
 def unfollow_user(self, user):
     self.following.remove(user)
     # invalidate caches
     following_cache = UserFollowingCache(prekey=self.user.id)
     following_cache.invalidate_cache()
     followers_cache = UserFollowersCache(prekey=user.id)
     followers_cache.invalidate_cache()
Exemplo n.º 3
0
 def get_following(self):
     """Gets User following
     Returns a list of User objects
     """
     c = UserFollowingCache(prekey=self.user.id)
     following = c.get()
     if following is None:
         following = self.following.all()
         c.cache_store(following)
     return following
Exemplo n.º 4
0
 def get_following(self):
     """Gets User following
     Returns a list of User objects
     """
     c = UserFollowingCache(prekey=self.user.id)
     following = c.get()
     if following is None:
         following = self.following.all()
         c.cache_store(following)
     return following