- if ( cache[ id ] ) {
- thisCache = cache[ id ];
- } else if ( typeof data === "undefined" ) {
- thisCache = emptyObject;
- } else {
- thisCache = cache[ id ] = {};
+ if ( typeof name === "object" ) {
+ if ( isNode ) {
+ cache[ id ] = jQuery.extend(true, {}, name);
+ } else {
+ store = jQuery.extend(true, {}, name);
+ cache[ id ] = function() {
+ return store;
+ };
+ }
+
+ } else if ( !cache[ id ] ) {
+ if ( isNode ) {
+ cache[ id ] = {};
+ } else {
+ store = {};
+ cache[ id ] = function() {
+ return store;
+ };
+ }
+