Skip to content

Simplify the memcache sample #838

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 1, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions appengine/flexible/memcache/app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,10 @@ runtime_config:

# [START env_variables]
env_variables:
# If you are using the App Engine Memcache service (currently in alpha),
# uncomment this section and comment out the other Memcache variables.
# USE_GAE_MEMCACHE: 1
MEMCACHE_SERVER: your-memcache-server
# If you are using a Memcached server with SASL authentiation enabled,
# fill in these values with your username and password.
MEMCACHE_USERNAME: your-memcache-username
MEMCACHE_PASSWORD: your-memcache-password
# If you are using a third-party or self-hosted Memcached server with SASL
# authentiation enabled, uncomment and fill in these values with your
# username and password.
# MEMCACHE_USERNAME: your-memcache-username
# MEMCACHE_PASSWORD: your-memcache-password
# [END env_variables]
9 changes: 1 addition & 8 deletions appengine/flexible/memcache/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,7 @@

# [START client]
# Environment variables are defined in app.yaml.
# Note: USE_GAE_MEMCACHE is in whitelist-only alpha. See README.md
if os.environ.get('USE_GAE_MEMCACHE'):
MEMCACHE_SERVER = ':'.join([
os.environ.get('GAE_MEMCACHE_HOST', 'localhost'),
os.environ.get('GAE_MEMCACHE_PORT', '11211')])
else:
MEMCACHE_SERVER = os.environ.get('MEMCACHE_SERVER', 'localhost:11211')

MEMCACHE_SERVER = os.environ.get('MEMCACHE_SERVER', 'localhost:11211')
MEMCACHE_USERNAME = os.environ.get('MEMCACHE_USERNAME')
MEMCACHE_PASSWORD = os.environ.get('MEMCACHE_PASSWORD')

Expand Down