Browse Source

Bugfix: Wrong keys were used for the cache.

pull/95/head
Sebastian Stehle 8 years ago
parent
commit
a24812afb2
  1. 6
      src/Squidex/app/shared/services/schemas.service.ts

6
src/Squidex/app/shared/services/schemas.service.ts

@ -711,8 +711,8 @@ export class SchemasService {
dto.fields || []);
})
.do(schema => {
this.localCache.set(`service.${appName}.${schema.id}`, schema, 5000);
this.localCache.set(`service.${appName}.${schema.name}`, schema, 5000);
this.localCache.set(`schema.${appName}.${schema.id}`, schema, 5000);
this.localCache.set(`schema.${appName}.${schema.name}`, schema, 5000);
})
.pretifyError('Failed to create schema. Please reload.');
}
@ -738,7 +738,7 @@ export class SchemasService {
return HTTP.deleteVersioned(this.http, url, version)
.do(() => {
this.localCache.remove(`service.${appName}.${schemaName}`);
this.localCache.remove(`schema.${appName}.${schemaName}`);
})
.pretifyError('Failed to delete schema. Please reload.');
}

Loading…
Cancel
Save