Skip to content
This repository has been archived by the owner on Jan 31, 2023. It is now read-only.

Commit

Permalink
actually update size
Browse files Browse the repository at this point in the history
  • Loading branch information
kelvinabrokwa committed Oct 9, 2017
1 parent 91de6b8 commit 6257193
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tile_cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ export default class TileCache {
}

/**
* Retrieve an item from the cache
*
* @param {string} tileKey
* @returns {Tile|null}
*/
get(tileKey) {
if (!(tileKey in this._cache)) {
Expand Down Expand Up @@ -139,6 +142,8 @@ export default class TileCache {
return;
}

this._size = size;

if (this._head == null) {
// this cache is empty
return;
Expand Down Expand Up @@ -172,7 +177,10 @@ export default class TileCache {
}

/**
* Returns a string reprenting the current order of tiles in the cache
*
* @returns {string}
* @private
*/
_stringifyList() {
let node = this._head;
Expand Down

0 comments on commit 6257193

Please sign in to comment.