Skip to content

Commit

Permalink
Fix Google App Engine backend
Browse files Browse the repository at this point in the history
Fixes #120
  • Loading branch information
sh4nks committed Nov 24, 2019
1 parent 258bd0a commit 11c5afe
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion flask_caching/backends/memcache.py
Expand Up @@ -156,7 +156,11 @@ def delete_many(self, *keys):
def has(self, key):
key = self._normalize_key(key)
if _test_memcached_key(key):
return self._client.append(key, "")
try:
return self._client.append(key, "")
except AttributeError:
# GAEMemecache has no 'append' function
return True if self._client.get(key) is not None else False
return False

def clear(self):
Expand Down

0 comments on commit 11c5afe

Please sign in to comment.