File size: 332 Bytes
3dfb537
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import { clear } from "/js/cache.js";

export default async function resetCache(ctx) {
  try {
    // clear frontend cache areas when backend caches are cleared via API
    if (ctx.endpoint == "cache_reset") {
      for (const area of ctx.data.areas) {
        clear(area);
      }
    }
  } catch (e) {
    console.error(e);
  }
}