ToothlessGear / node-gcm

A NodeJS wrapper library port to send data to Android devices via Google Cloud Messaging
https://github.com/ToothlessGear/node-gcm
Other
1.31k stars 206 forks source link

If an API key is invalid (response 401) cache that result #142

Open hypesystem opened 9 years ago

hypesystem commented 9 years ago

If an API key is invalid, no future requests will respond anything other than 401. That should be cached in the sender (because the sender depends on the API key), so we don't need to make more requests to get that result.

See Checking the validity of an API key in the GCM documentation.