MCPcopy Create free account
hub / github.com/benoitpointet/jquery-scrollsnap-plugin / createCache

Function createCache

demo/foundation/javascripts/jquery.js:3718–3730  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3716 },
3717
3718 createCache = function() {
3719 var cache = {},
3720 keys = [];
3721
3722 return markFunction(function( key, value ) {
3723 // Only keep the most recent entries
3724 if ( keys.push( key ) > Expr.cacheLength ) {
3725 delete cache[ keys.shift() ];
3726 }
3727
3728 return (cache[ key ] = value);
3729 }, cache );
3730 },
3731
3732 classCache = createCache(),
3733 tokenCache = createCache(),

Callers 1

jquery.jsFile · 0.85

Calls 1

markFunctionFunction · 0.85

Tested by

no test coverage detected