mirror of
https://github.com/sbrl/Nibriboard.git
synced 2018-01-10 21:33:49 +00:00
[client] Add debug method to clear the requested chunks from the chunk cache.
This commit is contained in:
parent
ea4a8b9b15
commit
9fa7a04d47
1 changed files with 8 additions and 0 deletions
|
@ -70,6 +70,14 @@ class ChunkCache
|
|||
return lineFragments;
|
||||
}
|
||||
|
||||
clearRequestedChunks()
|
||||
{
|
||||
for(let [chunkRefStr, chunk] of this.cache.entries()) {
|
||||
if(!(chunk instanceof Chunk))
|
||||
this.cache.delete(chunkRefStr);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the given chunk to the chunk cache.
|
||||
* @param {Chunk} chunkData The chunk to add to the cache.
|
||||
|
|
Loading…
Reference in a new issue