diff --git a/CHANGES.md b/CHANGES.md index c1f61cd..04b4032 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,7 +2,9 @@ ## 4.5.2 (not yet released) -- #95 Fix breakage of `triton image create` in version 4.5.0. (By Kris Shannon.) +- #95 Fix breakage of `triton image create` in v4.5.0. (By Kris Shannon.) +- #94, #93 `triton inst create ...` is broken if "images.json" cache file + is missing. (By Kris Shannon.) ## 4.5.1 diff --git a/lib/tritonapi.js b/lib/tritonapi.js index bd7cea7..9712caa 100644 --- a/lib/tritonapi.js +++ b/lib/tritonapi.js @@ -205,6 +205,15 @@ TritonApi.prototype._cachePutJson = function _cachePutJson(key, obj, cb) { }); }; +/** + * Lookup the given key in the cache and return a hit or `undefined`. + * + * @param {String} key: The cache key, e.g. 'images.json'. + * @param {Function} cb: `function (err, hit)`. + * `err` is an Error if there was an unexpected error loading from the + * cache. `hit` is undefined if there was no cache hit. On a hit, the + * type of `hit` depends on the key. + */ TritonApi.prototype._cacheGetJson = function _cacheGetJson(key, cb) { var self = this; assert.string(this.cacheDir, 'this.cacheDir');