Преглед изворни кода

fix(core): Use correct precision for CacheItem.expiresAt

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.
Michael Bromley пре 11 месеци
родитељ
комит
12e2db0550
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      packages/core/src/plugin/default-cache-plugin/cache-item.entity.ts

+ 1 - 1
packages/core/src/plugin/default-cache-plugin/cache-item.entity.ts

@@ -19,6 +19,6 @@ export class CacheItem extends VendureEntity {
     @Column('text')
     value: string;
 
-    @Column({ nullable: true })
+    @Column({ nullable: true, precision: 3 })
     expiresAt?: Date;
 }