My goal is to use LocalStorage as a cache and offline storage, and to use REST proxy as the online source. When data is fetched from the REST proxy, a copy is sent to the LocalStorage proxy.
Where is the best implementation point you would suggest?
Option 1: Implement a BaseModel with CRUD methods that does the routing.
Option 2: Implement a custom Store that does the routing.
Option 3: Implement a custom Proxy that does the routing.
I'm attempting Option 3 and extending from Proxy, but got an exception with 'Uncaught TypeError: Cannot call method 'getIdProperty' of null'. I guess it's related to the Model being null. Should I extend from DirectProxy instead? Or should I go with alternative options?