Skip to content
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

Update memcached sample #619

Merged
merged 4 commits into from
May 23, 2018
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Update app.js
  • Loading branch information
michaelawyu authored May 12, 2018
commit 885d875b589468d4e89f872c6ba58b7865a027dc
6 changes: 1 addition & 5 deletions appengine/memcached/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,7 @@ const app = express();

// [START client]
// Environment variables are defined in app.yaml.
let MEMCACHE_URL = process.env.MEMCACHE_URL || '127.0.0.1:11211';

if (process.env.USE_GAE_MEMCACHE) {
MEMCACHE_URL = `${process.env.GAE_MEMCACHE_HOST}:${process.env.GAE_MEMCACHE_PORT}`;
}
let MEMCACHE_URL = process.env.MEMCACHE_URL;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two questions:

  1. Is MEMCACHE_URL guaranteed to be defined? (Both on GAE, and in our tutorials)
  2. If not, is there ever a situation where 127.0.0.1:11211 makes sense as a default MEMCACHE_URL value?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Node-on-standard doesn't have built-in memcached service anymore :( 127.0.0.1:11211 is no longer available. In our tutorials there is a clear instruction suggesting users to deploy a free memcached instance provided by RedisLab.


const mc = memjs.Client.create(MEMCACHE_URL);
// [END client]
Expand Down