Exemplo n.º 1
0
 def delete_cache(self, playlist_id):
     limit = getSetting('pagination_limit')
     upkey = cache.make_key('/playlist/getUserPlaylists', limit=limit, 
                             offset=self.offset, user_id=api.user_id)
     pkey = cache.make_key('/playlist/get',playlist_id=playlist_id, 
         offset=self.offset, limit=limit, extra='tracks')
     cache.delete(upkey)
     cache.delete(pkey)
Exemplo n.º 2
0
 def _delete_cache(self):
     limit = getSetting('pagination_limit')
     key = cache.make_key('/favorite/getUserFavorites', 
                        user_id=api.user_id, 
                        limit=limit, 
                        offset=self.offset)
     return cache.delete(key)
Exemplo n.º 3
0
 def _delete_cache(self):
     limit = getSetting('pagination_limit')
     keys = []
     keys.append(cache.make_key('/favorite/getUserFavorites',
                        user_id=api.user_id,
                        limit=limit,
                        offset=self.offset))
     for kind in ['artists', 'albums', 'tracks']:
         keys.append(cache.make_key('/favorite/getUserFavorites',
                        user_id=api.user_id,
                        limit=limit,
                        type=kind,
                        offset=self.offset))
     ret = False
     for key in keys:
         if cache.delete(key):
             ret = True
     return ret
Exemplo n.º 4
0
 def delete_cache(self):
     key = cache.make_key("/user/login", username=api.username, password=api.password)
     cache.delete(key)
Exemplo n.º 5
0
 def delete_cache(self):
     key = cache.make_key('/user/login',
                          username=api.username,
                          password=api.password)
     cache.delete(key)