mirror of
https://github.com/fancive/obsidian-parallel-reader.git
synced 2026-07-22 06:53:43 +00:00
15 lines
290 B
TypeScript
15 lines
290 B
TypeScript
|
|
'use strict';
|
||
|
|
|
||
|
|
export function touchCacheEntry(entry, now?) {
|
||
|
|
if (!entry) return null;
|
||
|
|
entry.lastAccessedAt = now || new Date().toISOString();
|
||
|
|
return entry;
|
||
|
|
}
|
||
|
|
|
||
|
|
export function serializeCacheFile(entries) {
|
||
|
|
return JSON.stringify({
|
||
|
|
version: 1,
|
||
|
|
entries: entries || {},
|
||
|
|
});
|
||
|
|
}
|