ngx-material-entity 20.0.6 → 20.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2057,6 +2057,9 @@ class EntityService {
|
|
|
2057
2057
|
* @returns A Promise of all received Entities.
|
|
2058
2058
|
*/
|
|
2059
2059
|
async read(baseUrl = this.baseUrl) {
|
|
2060
|
+
if (this.lastRead != undefined && (Date.now() - this.lastRead.getTime()) <= this.READ_EXPIRATION_IN_MS) {
|
|
2061
|
+
return this.entitiesSubject.value;
|
|
2062
|
+
}
|
|
2060
2063
|
const e = await firstValueFrom(this.http.get(baseUrl));
|
|
2061
2064
|
this.entitiesSubject.next(e);
|
|
2062
2065
|
this.lastRead = new Date();
|