persistence for recurring api calls
All checks were successful
Build and push docker image / Build (pull_request) Successful in 1m48s

This commit is contained in:
2024-07-31 12:54:25 +02:00
parent db82495f11
commit 07dde5ab58
11 changed files with 118 additions and 81 deletions

View File

@@ -0,0 +1,18 @@
from pymemcache.client.base import Client
import constants
class DummyClient:
_data = {}
def set(self, key, value, **kwargs):
self._data[key] = value
def get(self, key, **kwargs):
return self._data[key]
if constants.MEMCACHE_HOST is None:
client = DummyClient()
else:
client = Client(constants.MEMCACHE_HOST, timeout=1)