walmartlabs/fruit-loops — pull request #52 by Candid (2014-11-06 19:07:23+00:00)
Title: Make ajax cache work with catbox 4.x

I am not sure about this line https://github.com/walmartlabs/fruit-loops/compare/catbox-4?expand=1#diff-2dd9daca757e2378de6a629d4b2f3c0dR52. We are basically replacing existing rules, which may have been set up somewhere else. In fact, we do pass `expiresIn` when constructing the cache policy in scotsman: https://github.com/walmartlabs/scotsman/blob/master/lib/index.js#L120. It seems like it doesn't matter in this case because `generateFunc` provides `ttl` explicitly, but generally this is not safe. Doing `_.extend(ajaxCache.rule, {generateFunc: generateFunc}` is also not safe because `ajaxCache.rule` is not public API.