Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
octonawish-akcodes committed Jul 7, 2023
1 parent c70a35b commit 00df583
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
6 changes: 2 additions & 4 deletions kcidb/cache/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,7 @@ def map(self, url):

if blob.exists():
return self._format_public_url(url)
else:
return None
return None

def is_stored(self, url):
"""
Expand All @@ -155,5 +154,4 @@ def fetch(self, url):

if blob.exists():
return blob.download_as_bytes()
else:
return None
return None
7 changes: 4 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,11 +352,12 @@ def send_message(message):

def get_cache():
"""Create the cache instance."""
global _CACHE_CLIENT
if _CACHE_CLIENT is None:
cache_client = _CACHE_CLIENT
if cache_client is None:
_CACHE_CLIENT = \
kcidb.cache.Client("cache_file_storage", 5 * 1024 * 1024)
return _CACHE_CLIENT
_CACHE_CLIENT = cache_client
return cache_client


def kcidb_cache_urls(event, context):
Expand Down

0 comments on commit 00df583

Please sign in to comment.