MCPcopy Create free account
hub / github.com/JsAaron/jQuery / cache

Function cache

2.1.1/test/jquery-2.1.1.js:854–861  ·  view source on GitHub ↗
( key, value )

Source from the content-addressed store, hash-verified

852 var keys = [];
853
854 function cache( key, value ) {
855 // Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
856 if ( keys.push( key + " " ) > Expr.cacheLength ) {
857 // Only keep the most recent entries
858 delete cache[ keys.shift() ];
859 }
860 return (cache[ key + " " ] = value);
861 }
862 return cache;
863}
864

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected