优化后端

This commit is contained in:
Miayui
2026-09-11 17:56:56 +08:00
parent 7eed11b774
commit 812e67422d
7299 changed files with 1744959 additions and 112 deletions
+21
View File
@@ -0,0 +1,21 @@
var Cache = /** @class */ (function () {
function Cache(populate) {
this.populate = populate;
this.value = undefined;
}
Cache.prototype.getValue = function () {
return this.value;
};
Cache.prototype.access = function () {
if (!this.value)
this.value = this.populate();
return this.value;
};
Cache.prototype.invalidate = function () {
this.value = undefined;
};
Cache.populatedBy = function (populate) { return new Cache(populate); };
return Cache;
}());
export default Cache;
//# sourceMappingURL=Cache.js.map