3 ms·
Let me explain my use case. We have several listings (Unassigned, My Tickets, All Tickets etc). A list view initializes a TicketList collection and then does th
by prateekdayal 15y ago
Let me explain my use case. We have several listings (Unassigned, My Tickets, All Tickets etc). A list view initializes a TicketList collection and then does the usual rendering etc. Also, once we render a listing we cache the rendered view so moving between them is snappy. Every listing basically fetches from a collection url (for instance /tickets/unassigned, /tickets/my_tickets etc).
Let us say a ticket with id 10 is in two listings. If we do a .fetch() on one of the listings and the ticket with id 10 is updated (let's say the replies_count changed in the server), not only is the view corresponding to this listing updated, it is also updated for the other listings.
If every listing was based on the same TicketList collection object, your solution would work well. However since different listings use different TicketList objects (initialized with a different url), I came up with the identity map solution.
- crescentfresh 15y agoHave you considered filtering of "all tickets" in the client, for different subsets? Eg http://stackoverflow.com/q/6865316/172188 http://stackoverflow.com/q/6865316/172188