| OLD | NEW |
| 1 // Copyright 2015 The LUCI Authors. All rights reserved. | 1 // Copyright 2015 The LUCI Authors. All rights reserved. |
| 2 // Use of this source code is governed under the Apache License, Version 2.0 | 2 // Use of this source code is governed under the Apache License, Version 2.0 |
| 3 // that can be found in the LICENSE file. | 3 // that can be found in the LICENSE file. |
| 4 | 4 |
| 5 package gaeconfig | 5 package gaeconfig |
| 6 | 6 |
| 7 import ( | 7 import ( |
| 8 "encoding/hex" | 8 "encoding/hex" |
| 9 "time" | 9 "time" |
| 10 | 10 |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 log.ErrorKey: err, | 74 log.ErrorKey: err, |
| 75 "key": k, | 75 "key": k, |
| 76 }.Warningf(c, "Failed to cache config.") | 76 }.Warningf(c, "Failed to cache config.") |
| 77 } | 77 } |
| 78 | 78 |
| 79 // Return the loaded value. | 79 // Return the loaded value. |
| 80 return v, nil | 80 return v, nil |
| 81 | 81 |
| 82 default: | 82 default: |
| 83 // Unknown memcache error. | 83 // Unknown memcache error. |
| 84 » » » » log.Fields{ | 84 » » » » return nil, errors.Annotate(err).Reason("failed
to load memcache config").Err() |
| 85 » » » » » log.ErrorKey: err, | |
| 86 » » » » » "key": k, | |
| 87 » » » » }.Warningf(c, "Failed to decode memcached config
.") | |
| 88 » » » » return l(c, key, nil) | |
| 89 } | 85 } |
| 90 }, | 86 }, |
| 91 } | 87 } |
| 92 } | 88 } |
| 93 | 89 |
| 94 func memcacheKey(key *caching.Key) string { return hex.EncodeToString(key.ParamH
ash()) } | 90 func memcacheKey(key *caching.Key) string { return hex.EncodeToString(key.ParamH
ash()) } |
| OLD | NEW |