Closed beleon closed 6 years ago
Any thoughts on this?
WriteStream only busts the cache, never writes to it; caching is done on read. Do you mean ReadStream/readStreamWithLock?
Ah, there has been a misunderstanding on my part about what the CacheSizeMax option is supposed to do. I thought of the whole key value store as the cache (because this is the context I use it in) and therefore of the CacheSizeMax option as a limit for the maximum amount of space that the key value store is allowed to take up on the disk (that's what I would need). Sorry for that.
The WriteStream function or to be precise the writeStreamWithLock function does not check for the CacheSizeMax option, which results in too large files being stored. Is this intentional because it's a stream? I'm using the github.com/gregjones/httpcache library which uses the WriteStream function. Anything that can be done here? :)