Home / Function/ getContextFromCache() — tailwindcss Function Reference

getContextFromCache() — tailwindcss Function Reference

Architecture documentation for the getContextFromCache() function in index.ts from the tailwindcss codebase.

Entity Profile

Dependency Diagram

graph TD
  aedb31dd_2729_9802_8cc8_22b3c31651b5["getContextFromCache()"]
  b294614b_1806_4c31_9786_09a2dbe0d909["index.ts"]
  aedb31dd_2729_9802_8cc8_22b3c31651b5 -->|defined in| b294614b_1806_4c31_9786_09a2dbe0d909
  7819558a_2ee5_2bed_63fd_99f25ef02d0f["tailwindLoader()"]
  7819558a_2ee5_2bed_63fd_99f25ef02d0f -->|calls| aedb31dd_2729_9802_8cc8_22b3c31651b5
  style aedb31dd_2729_9802_8cc8_22b3c31651b5 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/@tailwindcss-webpack/src/index.ts lines 43–55

function getContextFromCache(inputFile: string, opts: LoaderOptions): CacheEntry {
  let key = `${inputFile}:${opts.base ?? ''}:${JSON.stringify(opts.optimize)}`
  if (cache.has(key)) return cache.get(key)!
  let entry: CacheEntry = {
    mtimes: new Map<string, number>(),
    compiler: null,
    scanner: null,
    candidates: new Set<string>(),
    fullRebuildPaths: [],
  }
  cache.set(key, entry)
  return entry
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does getContextFromCache() do?
getContextFromCache() is a function in the tailwindcss codebase, defined in packages/@tailwindcss-webpack/src/index.ts.
Where is getContextFromCache() defined?
getContextFromCache() is defined in packages/@tailwindcss-webpack/src/index.ts at line 43.
What calls getContextFromCache()?
getContextFromCache() is called by 1 function(s): tailwindLoader.

Analyze Your Own Codebase

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

Try Supermodel Free