mirror of
https://github.com/henrygd/beszel.git
synced 2025-12-17 18:56:17 +01:00
Add caching to the web app to reduce requests for the same data
This commit is contained in:
@@ -136,8 +136,8 @@ export function updateRecordList<T extends RecordModel>(
|
||||
$store.set(newRecords)
|
||||
}
|
||||
|
||||
export function getPbTimestamp(timeString: ChartTimes) {
|
||||
const d = chartTimeData[timeString].getOffset(new Date())
|
||||
export function getPbTimestamp(timeString: ChartTimes, d?: Date) {
|
||||
d ||= chartTimeData[timeString].getOffset(new Date())
|
||||
const year = d.getUTCFullYear()
|
||||
const month = String(d.getUTCMonth() + 1).padStart(2, '0')
|
||||
const day = String(d.getUTCDate()).padStart(2, '0')
|
||||
|
||||
Reference in New Issue
Block a user