You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be an interesting addition to be able to provide a selector for the parent collection. For example:
// Only add a chairCount on furniture of type "table"Furniture.cacheCount({collection: Furniture,referenceField: 'furnitureLink',cacheField: 'chairCount',parentSelector: {type: 'table'},selector: {type: 'chair'},})// Only add a legCount on furniture of type "chair"Furniture.cacheCount({collection: Legs,referenceField: 'furnitureLink',cacheField: 'legCount',parentSelector: {type: 'chair'},})
This allows "polymorphic" collections to have different caches depending on their category, type, etc.
It is mostly done for keeping things clean, but one could also imagine using different cache configurations with the same name:
It would be an interesting addition to be able to provide a selector for the parent collection. For example:
This allows "polymorphic" collections to have different caches depending on their category, type, etc.
It is mostly done for keeping things clean, but one could also imagine using different cache configurations with the same name:
Here's a sarcastic example 🤣:
You would be responsible for maintaining non-overlapping parent selectors of course, otherwise it will not work.
The text was updated successfully, but these errors were encountered: