@xeokit/xeokit-sdk
Version:
3D BIM IFC Viewer SDK for AEC engineering applications. Open Source JavaScript Toolkit based on pure WebGL for top performance, real-world coordinates and full double precision
30 lines (23 loc) • 472 B
JavaScript
const Cache = {
enabled: false,
files: {},
add: function (key, file) {
if (this.enabled === false) {
return;
}
this.files[key] = file;
},
get: function (key) {
if (this.enabled === false) {
return;
}
return this.files[key];
},
remove: function (key) {
delete this.files[key];
},
clear: function () {
this.files = {};
}
};
export {Cache};