Skip to content

Commit

Permalink
fix cache gating in G+ and Twitter get_activities()
Browse files Browse the repository at this point in the history
  • Loading branch information
snarfed committed Apr 1, 2014
1 parent b79051e commit 9373ba6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion googleplus.py
Expand Up @@ -133,7 +133,7 @@ def request_with_etag(*args, **kwargs):

response = self._make_activities_base_response(activities)
response['etag'] = etag
if cache_updates:
if cache_updates and cache is not None:
cache.set_multi(cache_updates)
return response

Expand Down
2 changes: 1 addition & 1 deletion twitter.py
Expand Up @@ -225,7 +225,7 @@ def get_activities_response(self, user_id=None, group_id=None, app_id=None,

response = self._make_activities_base_response(activities)
response.update({'total_count': total_count, 'etag': etag})
if cache is not None:
if cache_updates and cache is not None:
cache.set_multi(cache_updates)
return response

Expand Down

0 comments on commit 9373ba6

Please sign in to comment.