Skip to content

Conversation

@imjoshdean
Copy link

@imjoshdean imjoshdean commented Sep 27, 2016

For #133:

If can/map is being used alongside fall-through-cache, new attributes will be added to Maps and Lists.

  • isConsistent() will return true if the data is actively in sync with the data from the server, false if it's relying on fall-back-cache's cached data.
  • inconsistencyReason will return the base connection's rejected promise error, should there be one.

// what do we do here? self.rejectedUpdatedList ?
console.log("REJECTED", e);
console.error("baseConnect.getListData rejected", e);
self.rejectedUpdatedInstance(list, e);
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this should be rejectedUpdatedList?

Copy link
Author

Choose a reason for hiding this comment

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

I don't, "instance" was the best neutral name I could come up with to apply to both a map and a list.

var behavior = {
init: function() {
// If List and Map are on the behavior, then we go ahead and add the
// isConsistent API information.
Copy link
Contributor

Choose a reason for hiding this comment

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

We should probably avoid having fall-through-cache know anything about can-connect/can/map. Can you think of a way to avoid this?

Copy link
Author

Choose a reason for hiding this comment

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

Off the top of my head no. Based on the suggested requirements, these features would be specific to maps and lists, and made sense to me that if we wanted to have these function features available in templates.

Do you have any suggestions?

@justinbmeyer
Copy link
Contributor

Thanks @imjoshdean. Please let me know if you have any thoughts about this stuff.

@imjoshdean
Copy link
Author

Thoughts provided inline!

@matthewp
Copy link
Contributor

@justinbmeyer this is waiting review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants