Thanks to visit codestin.com
Credit goes to github.com

Skip to content

issue(isr): no new cache with a new buildId #1792

Closed
@maxisam

Description

@maxisam

Description

Just discovered this issue. If the buildId is different, it will not regenerate another new cache but just serve from the SSR.
This behavior has been like this since 16 or older.

if (cacheHasBuildId && cacheConfig.buildId !== this.config.buildId) {
// Cache is from a different build. Serve user using SSR
next();
return;
}

It is kinda surprised to me, because my old system will create another cache for different build. However, I used buildId as part of the cache key as well, so it is actually easier for me to handle multiple versions. With #1771, users can achieve this and avoid issue like deploying a new version, there is no cache until you invalidate previous cache.

I am not sure if we want to change existing behavior, because with this structure, it can only keep one version of cache anyway.

@eneajaho let me know how you think. Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions