Scott González
unread,Aug 10, 2011, 3:00:42 PM8/10/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ampl...@googlegroups.com
This will also clear the cache for a specific request using the built in cache: "persist":
function clearRequestCache( resourceId ) {
var prefix = "request-" + resourceId,
length = prefix.length,
type = amplify.request.resources[ resourceId ]
$.each( amplify.store(), function( key ) {
if ( key.substring( 0, length ) === prefix ) {
amplify.store( key, null );
}
});
}
It's worth noting that this only works with cache: "persist" and won't work with the other named caches or the in-memory cache, which is why Andrew suggests building a new cache type that is meant to invalid caches.