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

Function cache

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

Source from the content-addressed store, hash-verified

889 var keys = [];
890
891 function cache( key, value ) {
892 // Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
893 if ( keys.push( key + " " ) > Expr.cacheLength ) {
894 // Only keep the most recent entries
895 delete cache[ keys.shift() ];
896 }
897 return (cache[ key + " " ] = value);
898 }
899 return cache;
900}
901

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected