Skip to content
This repository has been archived by the owner on Mar 20, 2021. It is now read-only.

Make ajax cache work with catbox 4.x #52

Merged
merged 2 commits into from
Nov 10, 2014
Merged

Make ajax cache work with catbox 4.x #52

merged 2 commits into from
Nov 10, 2014

Conversation

candid82
Copy link
Contributor

@candid82 candid82 commented Nov 6, 2014

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.

url = options.url;

if (/=\?/.test(url)) {
url = url.replace('=?', '=$jsonp$');
Copy link
Contributor

Choose a reason for hiding this comment

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

This changes the url that is cached, right? Do we care?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't see any reason to care.

kpdecker added a commit that referenced this pull request Nov 10, 2014
Make ajax cache work with catbox 4.x
@kpdecker kpdecker merged commit 3bfa211 into master Nov 10, 2014
@kpdecker kpdecker deleted the catbox-4 branch November 10, 2014 17:08
@kpdecker
Copy link
Contributor

kpdecker commented Jan 5, 2015

Released in 0.16.0

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants