Source code

Revision control

Copy as Markdown

Other Tools

<html>
<head>
<script>
async function ensureCache(name) {
if (!window.testCache) {
window.testCache = await caches.open(name);
}
return window.testCache;
};
function releaseCache() {
window.testCache = null;
}
async function addDataIntoCache(name, request, response) {
let cache = await ensureCache(name);
return cache.put(request, response);
};
</script>
</head>
</html>