Skip to content

Commit

Permalink
remove duplicate unlink function definition
Browse files Browse the repository at this point in the history
  • Loading branch information
Joe Portela authored and gergelypolonkai committed Nov 21, 2019
1 parent 2d5946f commit dd5cdc2
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions flask_caching/backends/rediscache.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,19 +203,6 @@ def unlink(self, *keys):
return self._write_client.unlink(*keys)
return self._write_client.delete(*keys)

def unlink(self, *keys):
"""when redis-py >= 3.0.0 and redis > 4, support this operation
"""
if not keys:
return
if self.key_prefix:
keys = [self.key_prefix + key for key in keys]

unlink = getattr(self._write_client, "unlink", None)
if unlink is not None and callable(unlink):
return self._write_client.unlink(*keys)
return self._write_client.delete(*keys)


class RedisSentinelCache(RedisCache):
"""Uses the Redis key-value store as a cache backend.
Expand Down

0 comments on commit dd5cdc2

Please sign in to comment.