Skip to content

Commit

Permalink
Try again to run CI pipeline.
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-cutler-datarobot committed Aug 22, 2023
1 parent 7f93280 commit 5d754e8
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion tests/performance/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import logging
import uuid

import redis.asyncio as redis
from aiohttp import web

from aiocache import Cache
Expand All @@ -16,7 +17,17 @@ def __init__(self, backend: str):
"redis": Cache.REDIS,
"memcached": Cache.MEMCACHED,
}
self.cache = Cache(backends[backend])
if backend == "redis":
cache_kwargs = {'client': redis.Redis(
host="127.0.0.1",
port=6379,
db=0,
password=None,
decode_responses=False,
)}
else:
cache_kwargs = dict()
self.cache = Cache(backends[backend], **cache_kwargs)

async def get(self, key):
return await self.cache.get(key, timeout=0.1)
Expand Down

0 comments on commit 5d754e8

Please sign in to comment.