Closed hazeledmands closed 10 years ago
Pretty much the opposite of #8. It would be really useful (esp. in unit tests) to add items to the cache programmatically.
Perhaps something like:
var Resource = $cachedResource('derp', '/derp/:id', { id: '@id' }); // class method Resource.$addToCache({herp: true, id: 1234}); // returns resource instance // instance method var item = new Resource({herp: true, id: 1234}); item.$$addToCache()
Using $$ instead of $ to namespace this as a "special" action that doesn't involve HTTP and can't be overridden.
$$
$
This would be particularly useful for cleaning up the tests, too.
Pretty much the opposite of #8. It would be really useful (esp. in unit tests) to add items to the cache programmatically.
Perhaps something like:
Using
$$
instead of$
to namespace this as a "special" action that doesn't involve HTTP and can't be overridden.