When low memory happen, JS side will receive 'OnLowMemory' event,
then call api to clear web cache and network cache.
Native Side Link:
https://review.tizen.org/gerrit/#/c/platform/framework/web/chromium-efl/+/211890/
Change-Id: Ib046d2d619297b1643fd033e5f295ba2f7855fb9
Signed-off-by: liwei <wei90727.li@samsung.com>
console.log('resume');
_this.webApplication.resume(_this.addonManager.resume_path);
});
+ wrt.on('low-memory', function() {
+ console.log('low-memory');
+ _this.webApplication.lowMemory();
+ });
}
handleIpcMessages() {
var _this = this;
}
}
}
+ lowMemory() {
+ console.log('WebApplication : lowMemory to clearcache');
+ if (this.isTVProfile) {
+ this.windowList.forEach((window) => {
+ //clear webframe cache
+ wrt.clearWebCache(window.webContents);
+ window.webContents.session.clearCache(function() {
+ console.log('clear session Cache complete');
+ })
+ });
+ }
+ }
}
module.exports = WebApplication;