From 31ca68fb145ec69cb5947d60619997e15b8a60c4 Mon Sep 17 00:00:00 2001 From: Lovell Fuller Date: Fri, 28 Feb 2014 22:37:59 +0000 Subject: [PATCH] Improve documentation of cache method --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3e605bda..6cb613f8 100755 --- a/README.md +++ b/README.md @@ -103,11 +103,11 @@ sharp.resize("input.jpg", sharp.buffer.webp, 200, 300, {canvas: sharp.canvas.emb ### cache([limit]) -If `limit` is provided, set the `vips` internal cache limit to this value in MB. The default value is 100. +If `limit` is provided, set the (soft) limit of _libvips_ working/cache memory to this value in MB. The default value is 100. -Always returns cache statistics, namely current usage, high water mark and maximum limit. +This method always returns cache statistics, useful for determining how much working memory is required for a particular task. -The high water mark may be higher than the maximum limit. +Warnings such as _Application transferred too many scanlines_ are a good indicator you've set this value too low. ```javascript var stats = sharp.cache(); // { current: 98, high: 115, limit: 100 }