MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / createCacheKey

Function createCacheKey

apps/api/src/controllers/misc.controller.ts:25–28  ·  view source on GitHub ↗
(url: string, prefix = 'favicon')

Source from the content-addressed store, hash-verified

23
24// Helper functions
25function createCacheKey(url: string, prefix = 'favicon'): string {
26 const hash = crypto.createHash('sha256').update(url).digest('hex');
27 return `${prefix}:v2:${hash}`;
28}
29
30function validateUrl(raw?: string): URL | null {
31 try {

Callers 2

getFaviconFunction · 0.85
getOgImageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected