mirror of
https://github.com/twisterarmy/twister-html.git
synced 2025-02-04 19:14:14 +00:00
reduce accuracy of time property of storage items to seconds to save some space of local storage, #339
This commit is contained in:
parent
c07e6281ba
commit
65c5278169
@ -328,11 +328,10 @@ function _getResourceFromStorage(locator) {
|
||||
}
|
||||
|
||||
function _putResourceIntoStorage(locator, data) {
|
||||
var curTime = new Date().getTime() / 1000;
|
||||
var storedResource = {time: curTime, data: data};
|
||||
|
||||
var storage = $.localStorage;
|
||||
storage.set(locator, storedResource);
|
||||
$.localStorage.set(locator, {
|
||||
time: Math.trunc(new Date().getTime() / 1000),
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
function cleanupStorage() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user