- if ( !id )\r
- id = elem[ expando ] = ++uuid;\r
-\r
- // Only generate the data cache if we're\r
- // trying to access or manipulate it\r
- if ( name && !jQuery.cache[ id ] )\r
- jQuery.cache[ id ] = {};\r
-\r
+ if(!id) id = elem[ expando ] = ++uuid;\r
+\r
+ // Handle the case where there's no name immediately\r
+ if ( !name ) { return id; }\r
+\r
+ // Avoid generating a new cache unless none exists and we\r
+ // want to manipulate it.\r
+ if( cache[ id ] )\r
+ thisCache = cache[ id ];\r
+ else if( typeof data === "undefined" )\r
+ thisCache = emptyObject;\r
+ else\r
+ thisCache = cache[ id ] = {};\r
+ \r