Skip to content

Commit

Permalink
fix(core): Use correct precision for CacheItem.expiresAt
Browse files Browse the repository at this point in the history
Because no precision was specified, this meant that MariaDB would
default to a granularity of seconds, which meant that the e2e tests
for sub-second TTLs would intermittently fail.

BREAKING CHANGE: If you are using the DefaultCachePlugin, then
you should generate a migration that adds `precision(3)` to the
`expiresAt` column. This will only affect cache records so no prod
data will be affected by it.
  • Loading branch information
michaelbromley committed Feb 11, 2025
1 parent f1d4904 commit 12e2db0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ export class CacheItem extends VendureEntity {
@Column('text')
value: string;

@Column({ nullable: true })
@Column({ nullable: true, precision: 3 })
expiresAt?: Date;
}

0 comments on commit 12e2db0

Please sign in to comment.