mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08:06 +02:00
Increases page cache size when needed
This commit is contained in:
parent
0f0f0688a1
commit
df87df59b6
2 changed files with 12 additions and 2 deletions
|
@ -255,5 +255,11 @@ var Cache = function cacheCache(size) {
|
|||
data.shift().destroy();
|
||||
}
|
||||
};
|
||||
this.resize = function (newSize) {
|
||||
size = newSize;
|
||||
while (data.length > size) {
|
||||
data.shift().destroy();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue