MCPcopy Create free account
hub / github.com/cafebazaar/blacksmith / refresh

Function refresh

web/static/bower_components/angular/angular.js:6106–6119  ·  view source on GitHub ↗

* makes the `entry` the freshEnd of the LRU linked list

(entry)

Source from the content-addressed store, hash-verified

6104 * makes the `entry` the freshEnd of the LRU linked list
6105 */
6106 function refresh(entry) {
6107 if (entry != freshEnd) {
6108 if (!staleEnd) {
6109 staleEnd = entry;
6110 } else if (staleEnd == entry) {
6111 staleEnd = entry.n;
6112 }
6113
6114 link(entry.n, entry.p);
6115 link(entry, freshEnd);
6116 freshEnd = entry;
6117 freshEnd.n = null;
6118 }
6119 }
6120
6121
6122 /**

Callers 1

cacheFactoryFunction · 0.85

Calls 1

linkFunction · 0.85

Tested by

no test coverage detected