Home / Function/ getCachedGlobal() — supabase Function Reference

getCachedGlobal() — supabase Function Reference

Architecture documentation for the getCachedGlobal() function in getGlobals.ts from the supabase codebase.

Entity Profile

Dependency Diagram

graph TD
  5cd33a97_aa0f_cd73_7508_5592da81c9a5["getCachedGlobal()"]
  554555f6_2d09_f821_3d1c_c85dd8b596bf["getGlobal()"]
  5cd33a97_aa0f_cd73_7508_5592da81c9a5 -->|calls| 554555f6_2d09_f821_3d1c_c85dd8b596bf
  style 5cd33a97_aa0f_cd73_7508_5592da81c9a5 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/cms/src/utilities/getGlobals.ts lines 24–36

export const getCachedGlobal = (slug: Global, depth = 0) => {
  return async () => {
    try {
      const { unstable_cache } = await import('next/cache')
      const cached = unstable_cache(async () => getGlobal(slug, depth), [slug], {
        tags: [`global_${slug}`],
      })
      return cached()
    } catch {
      return getGlobal(slug, depth)
    }
  }
}

Subdomains

Calls

Frequently Asked Questions

What does getCachedGlobal() do?
getCachedGlobal() is a function in the supabase codebase.
What does getCachedGlobal() call?
getCachedGlobal() calls 1 function(s): getGlobal.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free