jqXhr = undefined;
// Try the cache
- if ( cache[url] ) {
+ if ( cache[ url ] ) {
// Update access freshness
cacheOrder.splice( $.inArray( url, cacheOrder ), 1 );
cacheOrder.push( url );
- return $.Deferred().resolve( cache[url] ).promise();
+ return $.Deferred().resolve( cache[ url ] ).promise();
}
// @todo Don't fetch the entire page. Ideally we'd only fetch the content portion or the data
jqXhr = undefined;
// Cache the newly loaded page
- cache[url] = $contents;
+ cache[ url ] = $contents;
cacheOrder.push( url );
// Remove the oldest entry if we're over the limit
if ( cacheOrder.length > 10 ) {
- delete cache[ cacheOrder[0] ];
+ delete cache[ cacheOrder[ 0 ] ];
cacheOrder = cacheOrder.slice( 1 );
}
} );