Skip to content

Cache mixin doesn't work with Rest without an object ID when adding when using the default Memory store for the cache #218

@denov

Description

@denov

using a store of [ Rest, Cache ] when you call store.add() the chain of calls is Cache.add() -> Rest.add() -> Cache.put() -> Rest.put()

in the Cache.put() function at line 147 in Cache.js - cachingStore.put(object, directives) makes a call to Memory which gives the the object an ID. this ID is then used to build the url by setting hasId to true at line 76 in Rest.js. so you end with a url like - /api/foo/0.142823

If you remove the call to cachingStore.put at line 147 and only update the cache after the master is finish things work correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions