diff --git a/lib/metro-ior-resolver.js b/lib/metro-ior-resolver.js index dc62dfc..6cb87eb 100644 --- a/lib/metro-ior-resolver.js +++ b/lib/metro-ior-resolver.js @@ -41,6 +41,22 @@ const CACHE_TTL = process.env.IOR_CACHE_TTL !== undefined // Use project-local cache directory instead of temp directory to avoid watchman issues const CACHE_DIR = path.join(process.cwd(), '.ior-cache', 'remote'); +// Log cache TTL configuration on startup +console.log('[IOR Resolver] Cache TTL Configuration:'); +if (CACHE_TTL === 0) { + console.log('[IOR Resolver] ✓ Cache DISABLED (IOR_CACHE_TTL=0) - Always fetching fresh'); +} else if (process.env.IOR_CACHE_TTL !== undefined) { + const ttlMinutes = Math.floor(CACHE_TTL / 60000); + const ttlSeconds = Math.floor((CACHE_TTL % 60000) / 1000); + const ttlFormatted = ttlMinutes > 0 + ? `${ttlMinutes}m ${ttlSeconds}s` + : `${ttlSeconds}s`; + console.log(`[IOR Resolver] ✓ Cache TTL set to ${ttlFormatted} (IOR_CACHE_TTL=${CACHE_TTL}ms)`); +} else { + console.log('[IOR Resolver] ✓ Cache TTL using default: 1 hour (3600000ms)'); +} +console.log(`[IOR Resolver] ✓ Cache directory: ${CACHE_DIR}`); + /** * Ensure cache directory exists */