Skip to content

Commit

Permalink
Merge pull request #9 from baldur/master
Browse files Browse the repository at this point in the history
Update SET and SETEX execute methods to omit named keys
  • Loading branch information
cr0hn committed Nov 19, 2019
2 parents 7385392 + dc20cb7 commit bcc3c6a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions aiohttp_cache/backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,12 @@ async def set(self, key: str, value: dict, expires: int = 3000):

if _expires == 0:
async with self._redis_pool.get() as redis:
await redis.execute('SET', name=self.key_prefix + key,
value=dump)
await redis.execute('SET', self.key_prefix + key,
dump)
else:
async with self._redis_pool.get() as redis:
await redis.execute('SETEX', key=self.key_prefix + key,
seconds=_expires, value=dump)
await redis.execute('SETEX', self.key_prefix + key,
_expires, dump)

async def delete(self, key: str):
async with self._redis_pool.get() as redis:
Expand Down

0 comments on commit bcc3c6a

Please sign in to comment.