示例#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)
示例#2
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
示例#3
0
 def _delete_cache(self):
     keys = [cache.make_key(
         '/favorite/getUserFavorites',
         user_id=user.get_id(),
         limit=self.limit,
         offset=self.offset)]
     for kind in ['artists', 'albums', 'tracks']:
         keys.append(
             cache.make_key(
                 '/favorite/getUserFavorites',
                 user_id=user.get_id(),
                 limit=self.limit,
                 type=kind,
                 offset=self.offset))
     ret = False
     for key in keys:
         if cache.delete(key):
             ret = True
     return ret
示例#4
0
 def delete_cache(cls):
     key = cache.make_key(
         '/user/login', username=user.username, password=user.password)
     cache.delete(key)
示例#5
0
 def delete_cache(cls):
     key = cache.make_key('/user/login',
                          username=user.username,
                          password=user.password)
     cache.delete(key)
示例#6
0
 def delete_cache(self, _playlist_id):
     method, args = self._fetch_args()
     key = cache.make_key(method, **args)
     cache.delete(key)
     clean_all(cache)
     self.remove_node_storage()
示例#7
0
 def delete_cache(self):
     key = cache.make_key('/user/login', username=api.username,
                          password=api.password)
     cache.delete(key)