next.js
269020a0 - Disable 2mb limit for custom incrementalCacheHandler (#59976)

Commit
2 years ago
Disable 2mb limit for custom incrementalCacheHandler (#59976) ### Fixing a bug ### What? Disable 2MB limit for custom incrementalCacheHandler ### Why? The limit is necessary because `FetchCache` has a 2MB limit, but it seems there was a miscommunication regarding the key coincidence, where `fetchCache` is a flag indicating that the method is called from fetch, rather than indicating that the `FetchCache` Provider is currently being used. We do not use Vercel, and as I understand it, we do not have the opportunity to use this functionality. In any case, it is more important for us to increase the limits, and in some cases, using a file storage is even preferable. ### How? I have created a flag that determines whether the use of `FetchCache` is possible at least in theory - if no custom provider is passed, and additionally configured it so that it is not an implementation of `FetchCache` as a protection against special individuals (*like me :)*). If everything is fine, I will write proper tests. Also, I would like to recommend making `FileSystemCache` public (_i.e. support it as public functionality_) so that it can be imported and extended or simply used to fix only it. Fixes #48324 (partially) --------- Co-authored-by: JJ Kasper <jj@jjsweb.site>
Author
Parents
Loading