Prune the label cache less aggressively

This commit is contained in:
Andreas Hocevar
2017-11-26 23:30:58 +01:00
parent ceab6444b9
commit 66d5d66129
2 changed files with 6 additions and 5 deletions
+2 -4
View File
@@ -268,12 +268,10 @@ ol.structs.LRUCache.prototype.set = function(key, value) {
/**
* @param {string} key Key.
* @param {T} value Value.
* Prune the cache.
*/
ol.structs.LRUCache.prototype.pruneAndSet = function(key, value) {
ol.structs.LRUCache.prototype.prune = function() {
while (this.canExpireCache()) {
this.pop();
}
this.set(key, value);
};